cihai

Python library for CJK (Chinese, Japanese, and Korean) language dictionary

https://github.com/cihai/cihai

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

chinese chinese-characters chinese-dictionary cjk datasets dictionary japanese japanese-dictionary library python

Keywords from Contributors

fake fake-data faker faker-generator test-data test-data-generator
Last synced: 6 months ago · JSON representation ·

Repository

Python library for CJK (Chinese, Japanese, and Korean) language dictionary

Basic Info
  • Host: GitHub
  • Owner: cihai
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage: https://cihai.git-pull.com
  • Size: 3.43 MB
Statistics
  • Stars: 92
  • Watchers: 3
  • Forks: 15
  • Open Issues: 12
  • Releases: 5
Topics
chinese chinese-characters chinese-dictionary cjk datasets dictionary japanese japanese-dictionary library python
Created about 12 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

cihai · Python Package License Code Coverage

Python library for CJK (chinese, japanese, korean) data.

This project is under active development. Follow our progress and check back for updates!

Quickstart

API / Library (this repository)

console $ pip install --user cihai

```python from cihai.core import Cihai

c = Cihai()

if not c.unihan.is_bootstrapped: # download and install Unihan to db c.unihan.bootstrap()

query = c.unihan.lookup_char('好') glyph = query.first() print("lookup for 好: %s" % glyph.kDefinition)

lookup for 好: good, excellent, fine; well

query = c.unihan.reverse_char('good') print('matches for "good": %s ' % ', '.join([glph.char for glph in query]))

matches for "good": 㑘, 㑤, 㓛, 㘬, 㙉, 㚃, 㚒, 㚥, 㛦, 㜴, 㜺, 㝖, 㤛, 㦝, ...

```

See API documentation and /examples.

CLI (cihai-cli)

console $ pip install --user cihai-cli

Character lookup:

console $ cihai info 好

yaml char: 好 kCantonese: hou2 hou3 kDefinition: good, excellent, fine; well kHangul: 호 kJapaneseOn: KOU kKorean: HO kMandarin: hǎo kTang: "*xɑ̀u *xɑ̌u" kTotalStrokes: "6" kVietnamese: háo ucn: U+597D

Reverse lookup:

console $ cihai reverse library

```yaml char: 圕 kCangjie: WLGA kCantonese: syu1 kCihaiT: '308.302' kDefinition: library kMandarin: tú kTotalStrokes: '13'

ucn: U+5715

```

UNIHAN data

All datasets that cihai uses have stand-alone tools to export their data. No library required.

Developing

console $ git clone https://github.com/cihai/cihai.git`

console $ cd cihai/

Bootstrap your environment and learn more about contributing. We use the same conventions / tools across all cihai projects: pytest, sphinx, mypy, ruff, tmuxp, and file watcher helpers (e.g. entr(1)).

Python versions

  • 0.19.0: Last Python 3.7 release

Quick links

Docs Build Status

Owner

  • Name: cihai
  • Login: cihai
  • Kind: organization
  • Email: cihai@git-pull.com
  • Location: 中国。Unknown Dynasty.

United front for open, permissive, high quality CJK datasets

Citation (CITATION.cff)

cff-version: 1.2.0
message: >-
  If you use this software, please cite it as below.
  NOTE: Change "x.y" by the version you use. If you are unsure about which version
  you are using run: `pip show cihai`."
authors:
- family-names: "Narlock"
  given-names: "Tony"
  orcid: "https://orcid.org/0000-0002-2568-415X"
title: "cihai"
type: software
version: x.y
url: "https://cihai.git-pull.com"

GitHub Events

Total
  • Watch event: 8
  • Delete event: 2
  • Issue comment event: 7
  • Pull request review event: 1
  • Pull request event: 4
  • Create event: 3
Last Year
  • Watch event: 8
  • Delete event: 2
  • Issue comment event: 7
  • Pull request review event: 1
  • Pull request event: 4
  • Create event: 3

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 1,401
  • Total Committers: 6
  • Avg Commits per committer: 233.5
  • Development Distribution Score (DDS): 0.111
Top Committers
Name Email Commits
Tony Narlock t****y@g****m 1,246
pyup-bot g****t@p****o 135
dependabot-preview[bot] 2****]@u****m 16
pre-commit-ci[bot] 6****]@u****m 2
Frankie Robertson f****e@r****e 1
Kian-Meng Ang k****g@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 8
  • Total pull requests: 136
  • Average time to close issues: 8 days
  • Average time to close pull requests: 29 days
  • Total issue authors: 3
  • Total pull request authors: 7
  • Average comments per issue: 1.13
  • Average comments per pull request: 2.01
  • Merged pull requests: 51
  • Bot issues: 0
  • Bot pull requests: 82
Past Year
  • Issues: 0
  • Pull requests: 10
  • Average time to close issues: N/A
  • Average time to close pull requests: 13 days
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 1.6
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 6
Top Authors
Issue Authors
  • tony (5)
  • AlphaNext (1)
  • sati-bodhi (1)
Pull Request Authors
  • tony (50)
  • dependabot[bot] (48)
  • dependabot-preview[bot] (40)
  • pre-commit-ci[bot] (2)
  • kody-f (1)
  • kianmeng (1)
  • pyup-bot (1)
Top Labels
Issue Labels
bug (1) enhancement (1)
Pull Request Labels
dependencies (88) github_actions (2) python (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 316 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 7
  • Total versions: 64
  • Total maintainers: 1
pypi.org: cihai

Library for CJK (chinese, japanese, korean) language data.

  • Versions: 64
  • Dependent Packages: 1
  • Dependent Repositories: 7
  • Downloads: 316 Last month
Rankings
Dependent packages count: 4.8%
Dependent repos count: 5.5%
Average: 7.7%
Stargazers count: 8.1%
Forks count: 9.6%
Downloads: 10.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

poetry.lock pypi
  • alabaster 0.7.12 develop
  • atomicwrites 1.4.1 develop
  • attrs 22.1.0 develop
  • babel 2.10.3 develop
  • beautifulsoup4 4.11.1 develop
  • black 22.6.0 develop
  • certifi 2022.6.15 develop
  • charset-normalizer 2.1.0 develop
  • codecov 2.1.12 develop
  • coverage 6.4.2 develop
  • docutils 0.18.1 develop
  • flake8 3.9.2 develop
  • furo 2022.6.21 develop
  • idna 3.3 develop
  • imagesize 1.4.1 develop
  • iniconfig 1.1.1 develop
  • isort 5.10.1 develop
  • jinja2 3.1.2 develop
  • livereload 2.6.3 develop
  • markdown-it-py 2.1.0 develop
  • markupsafe 2.1.1 develop
  • mccabe 0.6.1 develop
  • mdit-py-plugins 0.3.0 develop
  • mdurl 0.1.1 develop
  • mypy 0.971 develop
  • mypy-extensions 0.4.3 develop
  • myst-parser 0.18.0 develop
  • packaging 21.3 develop
  • pathspec 0.9.0 develop
  • platformdirs 2.5.2 develop
  • pluggy 1.0.0 develop
  • py 1.11.0 develop
  • pycodestyle 2.7.0 develop
  • pyflakes 2.3.1 develop
  • pygments 2.12.0 develop
  • pyparsing 3.0.9 develop
  • pytest 7.1.2 develop
  • pytest-cov 3.0.0 develop
  • pytest-rerunfailures 10.2 develop
  • pytest-watcher 0.2.3 develop
  • pytz 2022.1 develop
  • requests 2.28.1 develop
  • six 1.16.0 develop
  • snowballstemmer 2.2.0 develop
  • soupsieve 2.3.2.post1 develop
  • sphinx 5.1.1 develop
  • sphinx-argparse 0.3.1 develop
  • sphinx-autobuild 2021.3.14 develop
  • sphinx-autodoc-typehints 1.19.1 develop
  • sphinx-basic-ng 0.0.1a12 develop
  • sphinx-copybutton 0.5.0 develop
  • sphinx-inline-tabs 2021.4.11b8 develop
  • sphinx-issues 3.0.1 develop
  • sphinxcontrib-applehelp 1.0.2 develop
  • sphinxcontrib-devhelp 1.0.2 develop
  • sphinxcontrib-htmlhelp 2.0.0 develop
  • sphinxcontrib-jsmath 1.0.1 develop
  • sphinxcontrib-qthelp 1.0.3 develop
  • sphinxcontrib-serializinghtml 1.1.5 develop
  • sphinxext-opengraph 0.6.3 develop
  • sphinxext-rediraffe 0.2.7 develop
  • tomli 2.0.1 develop
  • tornado 6.2 develop
  • typed-ast 1.5.4 develop
  • urllib3 1.26.11 develop
  • watchdog 2.1.9 develop
  • appdirs 1.4.4
  • cihai-cli 0.9.0a0
  • click 8.1.3
  • colorama 0.4.5
  • importlib-metadata 4.12.0
  • kaptan 0.5.12
  • pyyaml 5.4.1
  • sqlalchemy 1.3.24
  • typing-extensions 4.3.0
  • unicodecsv 0.14.1
  • unihan-etl 0.14.0a0
  • zhon 1.1.5
  • zipp 3.8.1
pyproject.toml pypi
  • black * develop
  • codecov * develop
  • coverage * develop
  • docutils ~0.18.0 develop
  • flake8 * develop
  • furo * develop
  • isort * develop
  • mypy * develop
  • myst_parser * develop
  • pytest * develop
  • pytest-cov * develop
  • pytest-rerunfailures * develop
  • pytest-watcher ^0.2.3 develop
  • sphinx * develop
  • sphinx-argparse * develop
  • sphinx-autobuild * develop
  • sphinx-autodoc-typehints * develop
  • sphinx-copybutton * develop
  • sphinx-inline-tabs * develop
  • sphinx-issues * develop
  • sphinxext-opengraph * develop
  • sphinxext-rediraffe * develop
  • appdirs *
  • cihai-cli ~=0.9.0a0
  • kaptan *
  • python ^3.7
  • sqlalchemy <1.4
  • unihan-etl ~=0.14.0a0
.github/workflows/docs.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • dorny/paths-filter v2.7.0 composite
  • jakejarvis/cloudflare-purge-action v0.3.0 composite
  • jakejarvis/s3-sync-action v0.5.1 composite
.github/workflows/tests.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v3 composite
  • pypa/gh-action-pypi-publish release/v1 composite