Chinese character decomposition tools for breaking down characters into basic structural units
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hanzi_chaizi-0.4.0.tar.gz.
File metadata
- Download URL: hanzi_chaizi-0.4.0.tar.gz
- Upload date:
- Size: 183.1 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9ad188777066e6dce4477188c9711ae686dc947c59e5447e429bfc0a2f2361d
|
|
| MD5 |
c0ec1e27ec5cf80d6cb4d3ffdd12f69a
|
|
| BLAKE2b-256 |
66ca533e8964e1534cf3f545245a4de2a0468b09fe7ecaacf0ad9af2bf54ecaf
|
File details
Details for the file hanzi_chaizi-0.4.0-py3-none-any.whl.
File metadata
- Download URL: hanzi_chaizi-0.4.0-py3-none-any.whl
- Upload date:
- Size: 185.8 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a33e2c3cb4c7e20a775039e9f66a5124b9cd6c7aa2c4c0118c72a22ba89e92e7
|
|
| MD5 |
476793c0ad6f0e705238425ed2c21302
|
|
| BLAKE2b-256 |
54228590893ca785c9ccd318e28652c4eaca9de33b06f1c3a1a516e4091cfd32
|