Skip to main content

hangeul_jamo_rs

A high-performance Korean Hangul syllable and jamo manipulation library written in Rust with Python bindings.

Features

  • Fast decomposition/composition using pre-computed lookup tables
  • Dual API support: Both Rust and Python
  • Two jamo formats: HCJ (U+31xx) and U+11xx jamo
  • Compound jamo handling: Decompose/compose complex jamo characters

Installation

Rust

[dependencies]
hangeul_jamo = "0.1"

Usage

Rust

use hangeul_jamo::hcj::{decompose_hcj, compose_hcj};

// HCJ decomposition/composition
assert_eq!(decompose_hcj("한글"), "ㅎㅏㄴㄱㅡㄹ");
assert_eq!(compose_hcj("ㅎㅏㄴㄱㅡㄹ"), "한글");

// U+11xx jamo
use hangeul_jamo::jamo::{decompose_jamo, compose_jamo};
let jamo = decompose_jamo("한글");
assert_eq!(compose_jamo(&jamo), "한글");

// Compound jamo
use hangeul_jamo::core::{decompose_compound, compose_compound};
assert_eq!(decompose_compound('ㄲ'), Some(vec!['ㄱ', 'ㄱ']));
assert_eq!(compose_compound(&['ㄱ', 'ㄱ']), Some('ㄲ'));

API Reference

Core Functions

HCJ (Hangul Compatibility Jamo - U+31xx)

  • decompose_hcj(text) - Decompose syllables into HCJ jamo (한 → ㅎㅏㄴ)
  • compose_hcj(text) - Compose HCJ jamo into syllables (ㅎㅏㄴ → 한)

U+11xx Jamo

  • decompose_jamo(text) - Decompose syllables into U+11xx jamo
  • compose_jamo(text) - Compose U+11xx jamo into syllables

Character Checks

  • is_hangul_syllable(ch) - Check if character is Hangul syllable (U+AC00-U+D7A3)
  • is_hcj(ch) - Check if character is HCJ (U+31xx)
  • is_jamo(ch) - Check if character is U+11xx jamo
  • is_jamo_lead(ch) - Check if leading consonant
  • is_jamo_vowel(ch) - Check if vowel
  • is_jamo_tail(ch) - Check if trailing consonant
  • is_jamo_compound(ch) - Check if compound jamo (ㄲ, ㅘ, etc.)

Compound Jamo

  • decompose_compound(jamo) - Decompose compound jamo (ㄲ → [ㄱ, ㄱ])
  • compose_compound(components) - Compose into compound ([ㄱ, ㄱ] → ㄲ)

Conversion

  • jamo_to_hcj(ch) - Convert U+11xx jamo to HCJ (ᄀ → ㄱ)
  • hcj_to_jamo(ch, position) - Convert HCJ to U+11xx jamo (ㄱ → ᄀ)
    • position: "lead", "vowel", or "tail"

Metadata

Release files for hangeul-jamo-rs 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hangeul-jamo-rs 0.1.1
File Size Uploaded Provenance Actions
hangeul_jamo_rs-0.1.1.tar.gz 22.9 kB Without provenance Details for hangeul_jamo_rs-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hangeul-jamo-rs 0.1.1
File Interpreter ABI Platform Actions
hangeul_jamo_rs-0.1.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for hangeul_jamo_rs-0.1.1-cp313-cp313-win_amd64.whl

Total release size: 181.6 kB

Release files / hangeul_jamo_rs-0.1.1.tar.gz

Download URL hangeul_jamo_rs-0.1.1.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
feef0cb74fd550536a83d5c72e33ca7616b369ad4a0dd8e48551b40105d21eb0
BLAKE2b-256 checksum
How to use checksums
dd886f5a1a89f39fc4941b2422733524685e46f817e29e07861b6cf3e2b9fed0
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 / hangeul_jamo_rs-0.1.1-cp313-cp313-win_amd64.whl

Download URL hangeul_jamo_rs-0.1.1-cp313-cp313-win_amd64.whl
Size 158.7 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
832714f597a91649535be8b51474d3e72e1604157218d25d65bbdc3feda2c589
BLAKE2b-256 checksum
How to use checksums
8bc4ffe723840ab34576acbbf874dfe57355d82cfe9b071b6f4c09d525dfe9d9
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 hangeul-jamo-rs 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page