Registry / hangul-romanize

hangul-romanize

JSON →
library0.1.0pypypi✓ verified 84d ago

hangul-romanize is a Python library for romanizing Hangul strings, specifically adhering to the academic notation rules (국립국어원 학술 표기법) of the National Institute of Korean Language. As of version 0.1.0, it provides tools for converting Korean text into the Latin alphabet based on these scholarly guidelines.

pip install hangul-romanize
INSTALL
IMPORT
SIG · HANGUL-ROMANIZE
H
hangul-romanize
pythonv0.1.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.8MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Transliter
from hangul_romanize import Transliter
import hangul_romanize
The library exposes its core functionality through the `Transliter` class, not a top-level `romanize` function.
academic
from hangul_romanize.rule import academic
from hangul_romanize import academic
The rule sets are located in the `rule` submodule.

This quickstart demonstrates how to import the `Transliter` class and the `academic` rule set, then use them to romanize Korean Hangul strings. It prints the original and romanized text.

from hangul_romanize import Transliter from hangul_romanize.rule import academic # Initialize the transliterator with the academic rule set transliter = Transliter(academic) # Romanize a Hangul string hangul_text = u'안녕하세요' romanized_text = transliter.translit(hangul_text) print(f"Original: {hangul_text}, Romanized: {romanized_text}") # Example with another string hangul_text_2 = u'한글 로마자 변환' romanized_text_2 = transliter.translit(hangul_text_2) print(f"Original: {hangul_text_2}, Romanized: {romanized_text_2}")
Debug
Known issues
gotchaThe library primarily implements the 'academic notation rules' (국립국어원 학술 표기법), which may yield different results compared to the more commonly encountered 'Revised Romanization of Korean' (RR) used for public signage, names, and general communication. Users expecting RR may find the output inconsistent with their expectations.
fix
Consult the official documentation for the specific academic rules implemented by the library to understand its behavior. If 'Revised Romanization' is strictly required, consider alternative libraries or custom post-processing.
affects: All versions
gotchaKorean romanization, regardless of the system, often struggles to perfectly represent all phonetic nuances due to inherent differences in the phonological systems of Korean and Latin alphabets (e.g., distinctions between aspirated/unaspirated consonants, certain vowels).
fix
Understand that romanization is an approximation. For precise pronunciation, direct study of Hangul and Korean phonology is recommended. Do not rely solely on romanization for learning correct pronunciation.
affects: All versions
deprecatedThe library's last release was on April 7, 2020. While not explicitly deprecated, the infrequent updates suggest it may not actively incorporate new linguistic research, updated academic standards, or significant Python version compatibility fixes that could arise in the future.
fix
Verify compatibility with your current Python environment and review GitHub issues for any unaddressed bugs or feature requests. For long-term projects, consider the maintenance status.
affects: 0.1.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'hangul_romanize'
The 'hangul-romanize' package has not been installed in the current Python environment.
fix
Run `pip install hangul-romanize` to install the library.
AttributeError: module 'hangul_romanize' has no attribute 'romanize'
Attempting to call a global `romanize` function directly from the `hangul_romanize` module, which does not exist. The library's API requires instantiation of the `Transliter` class.
fix
You must first import and instantiate the `Transliter` class, then call its `translit` method: `from hangul_romanize import Transliter; from hangul_romanize.rule import academic; transliter = Transliter(academic); romanized = transliter.translit('안녕하세요')`.
Unexpected Romanization output for a common word or name (e.g., '김치' not romanizing as expected)
The library uses a specific academic rule set, which might not align with other common romanization systems (like Revised Romanization or older informal spellings) or perceived 'correct' pronunciations based on non-standard rules.
fix
Review the `hangul-romanize` GitHub repository and documentation to understand the precise academic rules it implements. If a different romanization standard is desired, consider using an alternative library or implementing custom mapping rules.
Upgrade
Version history
0.1.0latest on PyPI · released Apr 7, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
16
Resources
hangul-romanize — pip install hangul-romanize · libregistry