hanja-tools
한국 한자(漢字) 관련 기능을 통합한 Python 패키지입니다.
suminb/hanja가 제공하지 않는 획수·오행·인명용 필터·검색 기능을 추가합니다.
설치
pip install hanja-tools
빠른 시작
from hanja_tools import HanjaDB
db = HanjaDB()
db.get_eum('松') # '송' — 한글 음 (suminb/hanja 기반)
db.get_stroke('松') # 8 — 획수 (Unihan kTotalStrokes)
db.get_ohaeng('松') # '金' — 오행 (수리오행법: 8획 끝자리 8 → 金)
db.is_inmyong('松') # True — 인명용 한자 여부 (대법원 기준)
db.info('松')
# {'char': '松', 'eum': '송', 'stroke': 8, 'ohaeng': '金', 'inmyong': True}
# 검색
db.search_by_eum('송') # ['松', '誦', '頌', ...]
db.search_by_stroke(8) # 8획 한자 목록
db.search_by_ohaeng('木') # 木 오행 한자 목록
db.search(eum='송', inmyong=True) # 복합 조건
오행 분류표 (수리오행법)
| 획수 끝자리 | 오행 |
|---|---|
| 1, 2 | 木 |
| 3, 4 | 火 |
| 5, 6 | 土 |
| 7, 8 | 金 |
| 9, 0 | 水 |
데이터 출처
| 데이터 | 출처 | 라이선스 |
|---|---|---|
| 한자→음 | suminb/hanja table.yml (27,497자) |
CC0 |
| 획수 | Unicode Unihan Database kTotalStrokes |
Unicode License |
| 인명용 한자 | rutopio/Korean-Name-Hanja-Charset data-gov.csv |
MIT |
라이선스
MIT
Metadata
Release files for hanja-tools 0.1.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 | |
|---|---|---|---|
| hanja_tools-0.1.0.tar.gz | 320.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hanja_tools-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 632.7 kB
Release files / hanja_tools-0.1.0.tar.gz
| Download URL | hanja_tools-0.1.0.tar.gz |
|---|---|
| Size | 320.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c4ab26a29cec6be3ceb144c79dd0de239babbaec52078e2e76709b9659f4b816
|
|
BLAKE2b-256 checksum How to use checksums |
6996d63c35d103c0413b9552fb5c16354551f49c39ff02b7bce966866bb56bbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|
Release files / hanja_tools-0.1.0-py3-none-any.whl
| Download URL | hanja_tools-0.1.0-py3-none-any.whl |
|---|---|
| Size | 312.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73757fce212cbec8232c9ad4ca48714c086c0eb2d97068dd124f821f22e18af4
|
|
BLAKE2b-256 checksum How to use checksums |
54af7b272a9bfd9931f8747481b2179a4fac21230039c9b4a25c325069a4a52f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.1
|