A modern, optimized Korean Hangul syllable and jamo manipulation library
Project description
hangeul-jamo-py
Pure Python implementation for Korean Hangul syllable and jamo manipulation.
Installation
pip install hangeul-jamo-py
Quick Start
import hangeul_jamo_py as hangeul
# Decompose Hangul to jamo
hangeul.decompose_hcj('안녕하세요') # 'ㅇㅏㄴㄴㅕㅇㅎㅏㅅㅔㅇㅛ'
# Compose jamo to Hangul
hangeul.compose_hcj('ㅎㅏㄴㄱㅡㄹ') # '한글'
# Check character types
hangeul.is_hangul_syllable('한') # True
hangeul.is_hcj('ㄱ') # True
Core Functions
Composition/Decomposition
compose_hcj(text: str) -> str- Compose jamo to syllablesdecompose_hcj(text: str) -> str- Decompose syllables to HCJ jamocompose_jamo(text: str) -> str- Compose U+11xx jamo to syllablesdecompose_jamo(text: str) -> str- Decompose syllables to U+11xx jamo
Validation
is_hangul_syllable(char: str) -> bool- Check if Hangul syllable (U+AC00-U+D7A3)is_hcj(char: str) -> bool- Check if HCJ jamo (U+3131-U+318E)is_jamo(char: str) -> bool- Check if U+11xx jamois_jamo_lead/vowel/tail(char: str) -> bool- Check jamo position typeis_jamo_compound(char: str) -> bool- Check if compound jamo
Compound Jamo
decompose_compound(jamo: str) -> tuple[str, ...]- Decompose compound jamocompose_compound(components) -> str- Compose compound jamo
Conversion
jamo_to_hcj(char: str) -> str- Convert U+11xx to U+31xxhcj_to_jamo(char: str, position: str) -> str- Convert U+31xx to U+11xx
Features
- Zero dependencies - Pure Python implementation
- Python 3.13+ - Optimized for modern Python
- Type-safe - Full type hints
- Fast - O(1) lookups with pre-built tables
- Complete - Supports all 11,172 Hangul syllables
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
hangeul_jamo_py-1.0.0.tar.gz
(6.9 kB
view details)
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 hangeul_jamo_py-1.0.0.tar.gz.
File metadata
- Download URL: hangeul_jamo_py-1.0.0.tar.gz
- Upload date:
- Size: 6.9 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":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 |
e6bfe7c203a2c6d67406417ba78da02c7ec5cf9cec09f61fc80e2718b9f44025
|
|
| MD5 |
28953e6c34aeadddb9dea5671ac8742d
|
|
| BLAKE2b-256 |
9a0900d752d22dc6573088902188b5948cc14956f8a3da9e08aaab44abb67bfc
|
File details
Details for the file hangeul_jamo_py-1.0.0-py3-none-any.whl.
File metadata
- Download URL: hangeul_jamo_py-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.6 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":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 |
4fe63e7eb3908aa3790dd6f3a9c6ed7645ca7aa79a0b00b753e0c5e2feceff5a
|
|
| MD5 |
13b85510f4683d899e1c3f65f0a09229
|
|
| BLAKE2b-256 |
9b42a74d82ceec68ca1136df9532d6c034fc89c40f28376740a41ead0aacd147
|