CJKradlib
Generate compositions, supercompositions and variants for a given Hanzi / Kanji, based on cjkvi-ids. (Previously, cjk-decomp.)
Installation
pip install cjkradlib
Also, IDS sequences use full range of CJK ideographs, so the fonts that covers all encoded ideographs (such as HanaMin or Hanamin AFDKO ) should be used.
Usage
from cjkradlib import RadicalFinder
finder = RadicalFinder(lang='zh') # default is 'zh'
result = finder.search('麻')
print(result.compositions) # ['广', '林']
print(result.supercompositions) # ['摩', '魔', '磨', '嘛', '麽', '靡', '糜', '麾']
print(result.variants) # ['菻']
Supercompositions are based on the character frequency in each language, so altering the language give slightly different results.
from cjkradlib import RadicalFinder
finder = RadicalFinder(lang='jp')
result = finder.search('麻')
print(result.supercompositions) # ['摩', '磨', '魔', '麿']
Related projects
Plan
- Use https://github.com/cjkvi/cjkvi-ids as the source for CJK-decomposition.
Metadata
Release files for cjkradlib 0.2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cjkradlib-0.2.0.1.tar.gz | 1.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cjkradlib-0.2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 MB
Release files / cjkradlib-0.2.0.1.tar.gz
| Download URL | cjkradlib-0.2.0.1.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22f9ad3ad52067577c1643d8db65747f3363938503c9f260a4b7b912a12cdd1d
|
|
BLAKE2b-256 checksum How to use checksums |
47ac086f767b616668042d6d90adcaad0df7db29dec9b5611b383ff28ab03e3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.0a1 CPython/3.7.0 Darwin/17.7.0
|
Release files / cjkradlib-0.2.0.1-py3-none-any.whl
| Download URL | cjkradlib-0.2.0.1-py3-none-any.whl |
|---|---|
| Size | 4.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83c48a6d06a2a34c29e63194ef15756a85eb1747d6f0acc2b30b8d87b58c8bdd
|
|
BLAKE2b-256 checksum How to use checksums |
496e7cdb9a0d70c0db2ab25f18622f8f9482d423c2d22890260d98ca0ba1b895
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.0a1 CPython/3.7.0 Darwin/17.7.0
|