Skip to main content

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 syllables
  • decompose_hcj(text: str) -> str - Decompose syllables to HCJ jamo
  • compose_jamo(text: str) -> str - Compose U+11xx jamo to syllables
  • decompose_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 jamo
  • is_jamo_lead/vowel/tail(char: str) -> bool - Check jamo position type
  • is_jamo_compound(char: str) -> bool - Check if compound jamo

Compound Jamo

  • decompose_compound(jamo: str) -> tuple[str, ...] - Decompose compound jamo
  • compose_compound(components) -> str - Compose compound jamo

Conversion

  • jamo_to_hcj(char: str) -> str - Convert U+11xx to U+31xx
  • hcj_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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hangeul_jamo_py-1.0.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

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

Hashes for hangeul_jamo_py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e6bfe7c203a2c6d67406417ba78da02c7ec5cf9cec09f61fc80e2718b9f44025
MD5 28953e6c34aeadddb9dea5671ac8742d
BLAKE2b-256 9a0900d752d22dc6573088902188b5948cc14956f8a3da9e08aaab44abb67bfc

See more details on using hashes here.

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

Hashes for hangeul_jamo_py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4fe63e7eb3908aa3790dd6f3a9c6ed7645ca7aa79a0b00b753e0c5e2feceff5a
MD5 13b85510f4683d899e1c3f65f0a09229
BLAKE2b-256 9b42a74d82ceec68ca1136df9532d6c034fc89c40f28376740a41ead0aacd147

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page