Python API for CJK datasets. Part of the cihai project.
cihai - United front to provide open, accessible, and standardized access to CJK data
- Single tool for interfacing with CJK data, compare to cjklib.
- API, in python, for programatically interfacing with data.
- Compatible with python 2.7, 3.3+, and pypy/pypy3.
- Designed against a robust test suite. See Travis Builds and Revision History.
- Supports Unihan, upcoming support for character decomposition, dictionaries (CEDict).
- Extensible. For new data sets, read more about how you can extend cihai to support new datapackages compatible datasets.
- For more, see internals for design philosophy.
Workgroup and Standardization
- Find undigitized data sets relating to CJK
- Clarifying and negotiate license details of data sets, see permissively licensing your dataset.
- Create standardized, consistent packages for all data sets
- Maintain aforementioned datasets
- Continue to improve current infrastructure and packages while seeking out rare and undigitized CJK data for preservation and access
Python 2.7 and UCS
Note, to get this working on python 2.7, you must have python built with UCS4 via --enable-unicode=ucs4. You can test for UCS4 with:
>>> import sys >>> sys.maxunicode > 0xffff True
Most packaged and included python distributions will already be build with UCS4 (such as Ubuntu’s system python). On python 3.3 and greater, this distinction no longer exists, no action is needed.
|Python support||Python 2.7, >= 3.3, pypy|
$ git clone https://github.com/cihai/cihai.git
$ pip install cihai
$ git clone https://github.com/cihai/cihai.git cihai $ cd ./cihai $ virtualenv .env $ source .env/bin/activate $ pip install -e .
$ python setup.py test