Generate compositions, supercompositions and variants for a given Hanzi / Kanji
Project description
CJKradlib
Generate compositions, supercompositions and variants for a given Hanzi / Kanji.
Installation
pip install cjkradlib
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cjkradlib-0.1.0.tar.gz
(880.0 kB
view hashes)
Built Distribution
Close
Hashes for cjkradlib-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37288a09c86f469744e33d43fdcaf6c9555265264c6055713f2ff0ce087ead16 |
|
MD5 | 75d914db9802c7760fcf52f4c4201537 |
|
BLAKE2b-256 | e86bdea7ed64db214b6c095356228b6692303d8bae8049f3208fe9b062612e5f |