cihai


Namecihai JSON
Version 0.35.0 PyPI version JSON
download
home_pageNone
SummaryLibrary for CJK (chinese, japanese, korean) language data.
upload_time2024-12-21 12:05:05
maintainerNone
docs_urlNone
authorNone
requires_python<4.0,>=3.9
licenseMIT
keywords chinese cjk dataset dictionary encyclopedia japanese korean languages library sqlalchemy study unicode unihan
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.9, 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": null,
    "name": "cihai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "chinese, cjk, dataset, dictionary, encyclopedia, japanese, korean, languages, library, sqlalchemy, study, unicode, unihan",
    "author": null,
    "author_email": "Tony Narlock <tony@git-pull.com>",
    "download_url": "https://files.pythonhosted.org/packages/1d/aa/198997bb600d51d564ad51944017e7883241ab585cc8dcf81640246f444b/cihai-0.35.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.9, 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",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Library for CJK (chinese, japanese, korean) language data.",
    "version": "0.35.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/cihai/cihai/issues",
        "Documentation": "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": [
        "chinese",
        " cjk",
        " dataset",
        " dictionary",
        " encyclopedia",
        " japanese",
        " korean",
        " languages",
        " library",
        " sqlalchemy",
        " study",
        " unicode",
        " unihan"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc6474569ad1c627a4ded7d10caae5a41ae738192fe3cfb97f0683c49f535fcc",
                "md5": "b11aae7914bc80b97162d1b6ba990f1a",
                "sha256": "78642371ca70f8a0b6cc39540f1037cde32666f4301b07ed2bd110a26d42bdba"
            },
            "downloads": -1,
            "filename": "cihai-0.35.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b11aae7914bc80b97162d1b6ba990f1a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 25172,
            "upload_time": "2024-12-21T12:05:03",
            "upload_time_iso_8601": "2024-12-21T12:05:03.134982Z",
            "url": "https://files.pythonhosted.org/packages/bc/64/74569ad1c627a4ded7d10caae5a41ae738192fe3cfb97f0683c49f535fcc/cihai-0.35.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1daa198997bb600d51d564ad51944017e7883241ab585cc8dcf81640246f444b",
                "md5": "d9846a3b2443a849340a9fff153f5f57",
                "sha256": "7b11ed857ad94e9fed05deff836fab6d8bc5b3c32621bb716720bb9bb4c3e188"
            },
            "downloads": -1,
            "filename": "cihai-0.35.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d9846a3b2443a849340a9fff153f5f57",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 231990,
            "upload_time": "2024-12-21T12:05:05",
            "upload_time_iso_8601": "2024-12-21T12:05:05.633114Z",
            "url": "https://files.pythonhosted.org/packages/1d/aa/198997bb600d51d564ad51944017e7883241ab585cc8dcf81640246f444b/cihai-0.35.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-21 12:05:05",
    "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.49037s