cihai


Namecihai JSON
Version 0.33.0 PyPI version JSON
download
home_pagehttps://cihai.git-pull.com
SummaryLibrary for CJK (chinese, japanese, korean) language data.
upload_time2024-04-06 11:25:52
maintainerNone
docs_urlNone
authorTony Narlock
requires_python<4.0,>=3.8
licenseMIT
keywords unihan sqlalchemy library cjk unicode dictionary dataset encyclopedia chinese japanese korean languages study
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # cihai &middot; [![Python Package](https://img.shields.io/pypi/v/cihai.svg)](https://pypi.org/project/cihai/) [![License](https://img.shields.io/github/license/cihai/cihai.svg)](https://github.com/cihai/cihai/blob/master/LICENSE) [![Code Coverage](https://codecov.io/gh/cihai/cihai/branch/master/graph/badge.svg)](https://codecov.io/gh/cihai/cihai)

Python library for [CJK](https://cihai.git-pull.com/glossary.html#term-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](https://cihai.git-pull.com/api.html) documentation and
[/examples](https://github.com/cihai/cihai/tree/master/examples).

### CLI ([cihai-cli](https://cihai-cli.git-pull.com))

```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.

- [unihan-etl](https://unihan-etl.git-pull.com) - [UNIHAN](http://unicode.org/charts/unihan.html)
  data exports for csv, yaml and json.

## Developing

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

```console
$ cd cihai/
```

[Bootstrap your environment and learn more about contributing](https://cihai.git-pull.com/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

- [Quickstart](https://cihai.git-pull.com/quickstart.html)
- [Datasets](https://cihai.git-pull.com/datasets.html) a full list of current and future data sets
- Python [API](https://cihai.git-pull.com/api.html)
- [Roadmap](https://cihai.git-pull.com/design-and-planning/)
- Python support: >= 3.8, pypy
- Source: <https://github.com/cihai/cihai>
- Docs: <https://cihai.git-pull.com>
- Changelog: <https://cihai.git-pull.com/history.html>
- API: <https://cihai.git-pull.com/api.html>
- Issues: <https://github.com/cihai/cihai/issues>
- Test coverage: <https://codecov.io/gh/cihai/cihai>
- pypi: <https://pypi.python.org/pypi/cihai>
- OpenHub: <https://www.openhub.net/p/cihai>
- License: MIT

[![Docs](https://github.com/cihai/cihai/workflows/docs/badge.svg)](https://cihai.git-pull.com/)
[![Build Status](https://github.com/cihai/cihai/workflows/tests/badge.svg)](https://github.com/cihai/cihai/actions?query=workflow%3A%22tests%22)


            

Raw data

            {
    "_id": null,
    "home_page": "https://cihai.git-pull.com",
    "name": "cihai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "unihan, sqlalchemy, library, cjk, unicode, dictionary, dataset, encyclopedia, chinese, japanese, korean, languages, study",
    "author": "Tony Narlock",
    "author_email": "tony@git-pull.com",
    "download_url": "https://files.pythonhosted.org/packages/98/68/12cf82243f72028e3343e7c0dbe252aea2e5cb54f88d16fc587b8f789533/cihai-0.33.0.tar.gz",
    "platform": null,
    "description": "# cihai &middot; [![Python Package](https://img.shields.io/pypi/v/cihai.svg)](https://pypi.org/project/cihai/) [![License](https://img.shields.io/github/license/cihai/cihai.svg)](https://github.com/cihai/cihai/blob/master/LICENSE) [![Code Coverage](https://codecov.io/gh/cihai/cihai/branch/master/graph/badge.svg)](https://codecov.io/gh/cihai/cihai)\n\nPython library for [CJK](https://cihai.git-pull.com/glossary.html#term-cjk) (chinese, japanese,\nkorean) data.\n\nThis project is under active development. Follow our progress and check back for updates!\n\n## Quickstart\n\n### API / Library (this repository)\n\n```console\n$ pip install --user cihai\n```\n\n```python\nfrom cihai.core import Cihai\n\nc = Cihai()\n\nif not c.unihan.is_bootstrapped:  # download and install Unihan to db\n    c.unihan.bootstrap()\n\nquery = c.unihan.lookup_char('\u597d')\nglyph = query.first()\nprint(\"lookup for \u597d: %s\" % glyph.kDefinition)\n# lookup for \u597d: good, excellent, fine; well\n\nquery = c.unihan.reverse_char('good')\nprint('matches for \"good\": %s ' % ', '.join([glph.char for glph in query]))\n# matches for \"good\": \u3458, \u3464, \u34db, \u362c, \u3649, \u3683, \u3692, \u36a5, \u36e6, \u3734, \u373a, \u3756, \u391b, \u399d, ...\n```\n\nSee [API](https://cihai.git-pull.com/api.html) documentation and\n[/examples](https://github.com/cihai/cihai/tree/master/examples).\n\n### CLI ([cihai-cli](https://cihai-cli.git-pull.com))\n\n```console\n$ pip install --user cihai-cli\n```\n\nCharacter lookup:\n\n```console\n$ cihai info \u597d\n```\n\n```yaml\nchar: \u597d\nkCantonese: hou2 hou3\nkDefinition: good, excellent, fine; well\nkHangul: \ud638\nkJapaneseOn: KOU\nkKorean: HO\nkMandarin: h\u01ceo\nkTang: \"*x\u0251\u0300u *x\u0251\u030cu\"\nkTotalStrokes: \"6\"\nkVietnamese: h\u00e1o\nucn: U+597D\n```\n\nReverse lookup:\n\n```console\n$ cihai reverse library\n```\n\n```yaml\nchar: \u5715\nkCangjie: WLGA\nkCantonese: syu1\nkCihaiT: '308.302'\nkDefinition: library\nkMandarin: t\u00fa\nkTotalStrokes: '13'\nucn: U+5715\n--------\n```\n\n### UNIHAN data\n\nAll datasets that cihai uses have stand-alone tools to export their data. No library required.\n\n- [unihan-etl](https://unihan-etl.git-pull.com) - [UNIHAN](http://unicode.org/charts/unihan.html)\n  data exports for csv, yaml and json.\n\n## Developing\n\n```console\n$ git clone https://github.com/cihai/cihai.git`\n```\n\n```console\n$ cd cihai/\n```\n\n[Bootstrap your environment and learn more about contributing](https://cihai.git-pull.com/contributing/). We use the same conventions / tools across all cihai projects: `pytest`, `sphinx`, `mypy`, `ruff`, `tmuxp`, and file watcher helpers (e.g. `entr(1)`).\n\n## Python versions\n\n- 0.19.0: Last Python 3.7 release\n\n## Quick links\n\n- [Quickstart](https://cihai.git-pull.com/quickstart.html)\n- [Datasets](https://cihai.git-pull.com/datasets.html) a full list of current and future data sets\n- Python [API](https://cihai.git-pull.com/api.html)\n- [Roadmap](https://cihai.git-pull.com/design-and-planning/)\n- Python support: >= 3.8, pypy\n- Source: <https://github.com/cihai/cihai>\n- Docs: <https://cihai.git-pull.com>\n- Changelog: <https://cihai.git-pull.com/history.html>\n- API: <https://cihai.git-pull.com/api.html>\n- Issues: <https://github.com/cihai/cihai/issues>\n- Test coverage: <https://codecov.io/gh/cihai/cihai>\n- pypi: <https://pypi.python.org/pypi/cihai>\n- OpenHub: <https://www.openhub.net/p/cihai>\n- License: MIT\n\n[![Docs](https://github.com/cihai/cihai/workflows/docs/badge.svg)](https://cihai.git-pull.com/)\n[![Build Status](https://github.com/cihai/cihai/workflows/tests/badge.svg)](https://github.com/cihai/cihai/actions?query=workflow%3A%22tests%22)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Library for CJK (chinese, japanese, korean) language data.",
    "version": "0.33.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/cihai/cihai/issues",
        "Documentation": "https://cihai.git-pull.com",
        "Homepage": "https://cihai.git-pull.com",
        "Q & A": "https://github.com/cihai/cihai/discussions",
        "Release notes": "https://github.com/cihai/cihai/blob/master/CHANGES",
        "Repository": "https://github.com/cihai/cihai"
    },
    "split_keywords": [
        "unihan",
        " sqlalchemy",
        " library",
        " cjk",
        " unicode",
        " dictionary",
        " dataset",
        " encyclopedia",
        " chinese",
        " japanese",
        " korean",
        " languages",
        " study"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "780e60c88d6ed9fe0809ad98ae01e54f436a7b885ad4b974f4079d798380b398",
                "md5": "c938aaff0b8ea8aca7a8f162220c2537",
                "sha256": "4db5a8aa94aec0acd1a53f2e44eb5fd550c17a71d01d1382a8d40196684d29c3"
            },
            "downloads": -1,
            "filename": "cihai-0.33.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c938aaff0b8ea8aca7a8f162220c2537",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 25168,
            "upload_time": "2024-04-06T11:25:50",
            "upload_time_iso_8601": "2024-04-06T11:25:50.830077Z",
            "url": "https://files.pythonhosted.org/packages/78/0e/60c88d6ed9fe0809ad98ae01e54f436a7b885ad4b974f4079d798380b398/cihai-0.33.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "986812cf82243f72028e3343e7c0dbe252aea2e5cb54f88d16fc587b8f789533",
                "md5": "bcaaaaf5b06acf137f0830d97151584b",
                "sha256": "454a20636005ae6050af9d27b444189e25919c33c1a784d1c95b9364dcd09646"
            },
            "downloads": -1,
            "filename": "cihai-0.33.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bcaaaaf5b06acf137f0830d97151584b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 57093,
            "upload_time": "2024-04-06T11:25:52",
            "upload_time_iso_8601": "2024-04-06T11:25:52.755953Z",
            "url": "https://files.pythonhosted.org/packages/98/68/12cf82243f72028e3343e7c0dbe252aea2e5cb54f88d16fc587b8f789533/cihai-0.33.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-06 11:25:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cihai",
    "github_project": "cihai",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "cihai"
}
        
Elapsed time: 0.23999s