{"id":5974,"library":"jamo","title":"Jamo: Hangul Syllable and Jamo Analyzer","description":"Jamo is a Python library designed for the decomposition and synthesis of Hangul syllables into their constituent jamo characters. It supports both the U+11xx jamo characters and Hangul Compatibility Jamo (HCJ, U+31xx) for display purposes. Currently in beta release (version 0.4.1), the library primarily focuses on modern Hangul. While releases are sporadic, the project is actively maintained, with documentation reflecting the 0.4-beta interface.","status":"active","version":"0.4.1","language":"en","source_language":"en","source_url":"https://github.com/jdongian/python-jamo","tags":["korean","hangul","nlp","language processing","unicode","jamo","decomposition","synthesis"],"install":[{"cmd":"pip install jamo","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"note":"For decomposing Hangul syllables into U+11xx jamo characters.","symbol":"h2j","correct":"from jamo import h2j"},{"note":"For synthesizing Hangul syllables from U+11xx jamo characters.","symbol":"j2h","correct":"from jamo import j2h"},{"note":"For converting U+11xx jamo to Hangul Compatibility Jamo (HCJ, U+31xx) for better display.","symbol":"j2hcj","correct":"from jamo import j2hcj"},{"note":"For converting Hangul Compatibility Jamo (HCJ) to U+11xx jamo.","symbol":"hcj2j","correct":"from jamo import hcj2j"},{"note":"To determine if a jamo character is a 'lead', 'vowel', or 'tail' consonant.","symbol":"get_jamo_class","correct":"from jamo import get_jamo_class"},{"note":"Direct imports like `from jamo import h2j` are preferred in current documentation.","wrong":"from jamo import jamo\njamo.hangul_to_jamo(\"한글\")","symbol":"jamo.hangul_to_jamo"}],"quickstart":{"code":"from jamo import h2j, j2h, j2hcj\n\n# Hangul Decomposition (to U+11xx jamo)\nhangul_text = \"안녕하세요\"\ndecomposed_jamo = h2j(hangul_text)\nprint(f\"Decomposed (U+11xx): {decomposed_jamo}\")\n\n# Convert U+11xx jamo to Hangul Compatibility Jamo (HCJ) for display\ndisplay_jamo = j2hcj(decomposed_jamo)\nprint(f\"Decomposed (HCJ): {display_jamo}\")\n\n# Hangul Synthesis\nlead = 'ㅇ'\nvowel = 'ㅏ'\ntail = 'ㄴ'\nsynthesized_hangul = j2h(lead, vowel, tail)\nprint(f\"Synthesized: {synthesized_hangul}\")\n\n# Using splat operator for synthesis from a string of jamo\njamo_string = 'ㅇㅏㄴ'\nsynthesized_from_string = j2h(*jamo_string)\nprint(f\"Synthesized from string: {synthesized_from_string}\")","lang":"python","description":"This quickstart demonstrates how to decompose Hangul syllables into jamo characters, convert them to Hangul Compatibility Jamo (HCJ) for display, and synthesize Hangul syllables back from individual jamo."},"warnings":[{"fix":"Refer to the 0.4-beta documentation for updated function names and usage patterns.","message":"Function names and module interfaces underwent significant changes between versions 0.3 and 0.4.0 (e.g., `j2h` vs. `jamo_to_hangul`), which may break older codebases.","severity":"breaking","affected_versions":"0.3.x to 0.4.x"},{"fix":"Ensure input to `get_jamo_class` is a U+11xx jamo character. If you have HCJ, consider converting it first using `hcj2j` (with `position` argument where necessary).","message":"The `get_jamo_class` function is designed for U+11xx jamo characters and will raise an `InvalidJamoError` if passed Hangul Compatibility Jamo (HCJ) consonants, as they are ambiguous in class.","severity":"gotcha","affected_versions":"0.4.x"},{"fix":"Monitor future release notes for potential changes to the return type of `get_jamo_class` and update parsing logic accordingly.","message":"The string return value of `get_jamo_class` ('lead', 'vowel', 'tail') is currently under consideration for change in future versions.","severity":"deprecated","affected_versions":"0.4.x"},{"fix":"Always specify `position` when calling `hcj2j` with consonant HCJ characters, e.g., `hcj2j('ㅇ', 'lead')` vs `hcj2j('ㅇ', 'tail')`.","message":"When converting Hangul Compatibility Jamo (HCJ) to U+11xx jamo using `hcj2j`, you *must* provide the `position` argument (e.g., 'lead', 'vowel', 'tail') for consonant characters to resolve ambiguity.","severity":"gotcha","affected_versions":"0.4.x"},{"fix":"Use `j2hcj(h2j(text))` to get HCJ output for better font compatibility and display.","message":"U+11xx jamo characters may have display issues depending on the font and environment. It is often recommended to convert them to Hangul Compatibility Jamo (HCJ) using `j2hcj` for more uniform and reliable display.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}