Skip to main content

中文字词

Project description

字典数据是 此库 中的 data/word.json,成语数据是 idiom.json

字形数据来自 这里

接口

查成语

from chinese_characters_words import 词典
词典.查成语('一石二鸟')

如果查不到,返回 None;否则信息如下:

{
  '词'
  '释义'
  '例句'
  '渊源'
  '拼音'
  '缩写'
}

如:

{'词': '一石二鸟', '释义': '扔一颗石子打到两只鸟。比喻做一件事情得到两样好处。', '例句': '无', '渊源': '无', '拼音': 'yī shí èr niǎo', '缩写': 'ysen'}

找包含某字的成语

> print(词典.包含('精神'))

['抖搂精神', '抖擞精神', '精神百倍', '精神抖擞', '精神焕发', '精神恍惚', '精神满腹', '龙马精神', '人逢喜事精神爽', '桃李精神', '颐养精神']

查单字

from chinese_characters_words import 字典
字典.查单字('好')

如果查不到,返回 None;否则信息如下:

{
  '字'
  '旧体'
  '笔画数'
  '拼音'
  '部首'
  '释义'
  '其他'
}

字的结构描述

> print(字典.的结构('花'))

{'字型': '⿱', '部分': ['艹', '化']}

找包含某部分的字

> print(字典.包含('吴'))

['俣', '吴', '噳', '娱', '悮', '洖', '澞', '祦', '筽', '脵', '茣', '虞', '蜈', '誤', '误', '鋘', '鸆', '麌']

> print(字典.左边('甘'))

['甛', '邯']

> print(字典.上面('口'))

['兄', '另', '叧', '只', '号', '叾', '吊', '吕', '吴', '呆', '呈', '员', '呙', '咠', '品', '員', '啚', '肙', '虽', '足', '黾']

> print(字典.下面('天'))

['关', '吴', '昊', '癸', '龑']

参与开发

依赖的第三方 Python 包:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chinese_characters_words-0.0.13.tar.gz (14.4 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file chinese_characters_words-0.0.13.tar.gz.

File metadata

File hashes

Hashes for chinese_characters_words-0.0.13.tar.gz
Algorithm Hash digest
SHA256 39c42168afd9ba28ea1bf9fe760a91477d2c285c96b7170fcb3d66ac3aeff237
MD5 379401e20ae059452c56a63f9f198939
BLAKE2b-256 f1f94aa9cc7fddb631bff2c8401c0b0cf8a62ca6725a32c3e710e7a64c15410a

See more details on using hashes here.

File details

Details for the file chinese_characters_words-0.0.13-py3-none-any.whl.

File metadata

File hashes

Hashes for chinese_characters_words-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 99fccdca1344c629f79d1db6fef598f9c2ef527ce5267a6ead9a7c11df222eb5
MD5 7a23ce9b531c56a2299fc0bd0c705d08
BLAKE2b-256 477161804f6a220f64f10efead83c152472f64deb951eda56cd8bf05615760d7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page