fast-hangeul-jamo
A fast, optimized Korean Hangul syllable and jamo manipulation library for Python.
This is a meta-package that provides a unified interface for Korean Hangul processing with two implementation backends:
- Pure Python (
hangeul-jamo-py): Default, pure Python implementation - works everywhere - Rust-accelerated (
hangeul-jamo-rs): High-performance Rust implementation with Python bindings
Installation
Basic Installation (Pure Python)
pip install fast-hangeul-jamo
This installs the pure Python implementation, which works on all platforms without requiring compilation.
High-Performance Installation (Rust)
pip install fast-hangeul-jamo[rust]
This installs both implementations, with the Rust version taking priority for better performance.
Usage
from fast_hangeul_jamo import compose, decompose
# Compose jamo into syllables
syllable = compose('ㄱ', 'ㅏ', 'ㅁ') # -> '감'
# Decompose syllables into jamo
jamos = decompose('한글') # -> [('ㅎ', 'ㅏ', 'ㄴ'), ('ㄱ', 'ㅡ', 'ㄹ')]
# Check which implementation is being used
from fast_hangeul_jamo import _implementation
print(_implementation) # 'rust' or 'python'
The API is identical regardless of which backend is installed.
Implementation Details
hangeul-jamo-py (Pure Python)
- ✅ Works on all platforms
- ✅ No compilation required
- ✅ Easy to debug
hangeul-jamo-rs (Rust)
- ✅ 2-5x faster performance than python implementation
- ✅ Memory efficient
- ✅ Type-safe Rust implementation
Backend Selection
The package automatically selects the best available implementation:
- If
hangeul-jamo-rsis installed → use Rust implementation - Otherwise → use
hangeul-jamo-py(pure Python)
You can check which implementation is active:
from fast_hangeul_jamo import _implementation
print(f"Using {_implementation} implementation")
Performance Comparison
📊 Performance Ratio Analysis (vs slowest)
| Category | Slowest | jamo | hangul-jamo | hangeul_jamo_py | hangeul_jamo_rs |
|---|---|---|---|---|---|
| Single Syllable Decompose | jamo | 1.00x (slowest) | 2.15x faster | 3.33x faster | 7.91x faster |
| Short Text Decompose | jamo | 1.00x (slowest) | 1.33x faster | 4.58x faster | 14.62x faster |
| Medium Text Decompose | jamo | 1.00x (slowest) | 1.16x faster | 5.24x faster | 31.05x faster |
| Large Text Decompose | jamo | 1.00x (slowest) | 1.12x faster | 6.81x faster | 36.92x faster |
| Single Syllable Compose | jamo | 1.00x (slowest) | 39.01x faster | 26.69x faster | 52.54x faster |
| Short Text Compose | hangul-jamo | N/A | 1.00x (slowest) | 4.63x faster | 32.52x faster |
| Validation Syllable | hangul-jamo | 1.25x faster | 1.00x (slowest) | 1.24x faster | 1.81x faster |
| Roundtrip | hangul-jamo | N/A | 1.00x (slowest) | 4.32x faster | 22.03x faster |
Source by hangeul_jamo_benchmark
Contributing
This is a meta-package. For implementation issues:
- Pure Python implementation: hangeul-jamo-py
- Rust implementation: hangeul-jamo-rs
Metadata
Release files for fast-hangeul-jamo 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fast_hangeul_jamo-0.1.1.tar.gz | 2.5 kB | Without provenance | Details for fast_hangeul_jamo-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fast_hangeul_jamo-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for fast_hangeul_jamo-0.1.1-py3-none-any.whl |
Total release size: 6.2 kB
Release files / fast_hangeul_jamo-0.1.1.tar.gz
| Download URL | fast_hangeul_jamo-0.1.1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2504068a2c0380ef01f34af9c7375906e3938ead3166e0e1e0f700c0506c2d47
|
|
BLAKE2b-256 checksum How to use checksums |
fe2cf9109118e294ea33469498c3b4205129a39a351f9cd121e7d2039e77d4a7
|
| 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":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / fast_hangeul_jamo-0.1.1-py3-none-any.whl
| Download URL | fast_hangeul_jamo-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24516fe0e039ad857e6f8356a902e73f6aa1d645924b4ddbe58ad7cd49a50a56
|
|
BLAKE2b-256 checksum How to use checksums |
44f31c92166c38dce3a779e88c51b1d212e646fae253e63da01658fba8b1325b
|
| 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":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for fast-hangeul-jamo 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.