1 Star 2 Fork 1

吴烜 / chinese_characters_words

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

字典数据是 此库 中的 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 包:

Copyright (c) 2018 The Python Packaging Authority Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

中文单字、成语查询工具 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/zhishi/chinese_characters_words.git
git@gitee.com:zhishi/chinese_characters_words.git
zhishi
chinese_characters_words
chinese_characters_words
master

搜索帮助