Hanzi decomposition (Chinese character decomposition) | 汉字拆字
拆字是指將一文字,以筆畫、字形等基本組成單位分解成多個文字。 The decomposition of characters refers to breaking down a single character into multiple characters based on its basic components, such as strokes and structural elements.
汉字拆字让字型相似的字具有相似的拆解结果。 Hanzi decomposition yields similar decomposition results for characters with similar structures.
这种特性可以被深度学习模型用来作为字的特征之一:字形的特征。 This feature can be used by deep learning models as one of the features of characters: the structural feature.
Installation
pip install hanzi_chaizi
Usage
from hanzi_chaizi import HanziChaizi
hc = HanziChaizi()
result = hc.query('名')
print(result)
Output:
['夕', '口']
Development
See develop.md for development guide.
Credits
Data from 漢語拆字字典 (CC BY 3.0)
Citation
@misc{kong2018hanzichaizi,
title={Hanzi Chaizi},
author={Xiaoquan Kong},
howpublished={https://github.com/howl-anderson/hanzi_chaizi},
year={2018}
}
If the package is cited in books, seminars, and academic research papers, or used in company products, you are welcome (but not required) to email me about this. I'm glad to see the package being used and valuable to everyone.
Release files for hanzi_chaizi 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hanzi_chaizi-0.4.0.tar.gz | 183.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hanzi_chaizi-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 368.9 kB
Release files / hanzi_chaizi-0.4.0.tar.gz
| Download URL | hanzi_chaizi-0.4.0.tar.gz |
|---|---|
| Size | 183.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9ad188777066e6dce4477188c9711ae686dc947c59e5447e429bfc0a2f2361d
|
|
BLAKE2b-256 checksum How to use checksums |
66ca533e8964e1534cf3f545245a4de2a0468b09fe7ecaacf0ad9af2bf54ecaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / hanzi_chaizi-0.4.0-py3-none-any.whl
| Download URL | hanzi_chaizi-0.4.0-py3-none-any.whl |
|---|---|
| Size | 185.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a33e2c3cb4c7e20a775039e9f66a5124b9cd6c7aa2c4c0118c72a22ba89e92e7
|
|
BLAKE2b-256 checksum How to use checksums |
54228590893ca785c9ccd318e28652c4eaca9de33b06f1c3a1a516e4091cfd32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|