Expand description
Hangul string processing: syllable disassembly, choseong search, batchim/josa, and jamo assembly.
On crates.io the package is rusty_hangul.
In Rust the crate is still imported as hangul.
use hangul::{assemble, Hangul};
let text = Hangul::new("안녕하세요");
assert_eq!(text.disassemble(), "ㅇㅏㄴㄴㅕㅇㅎㅏㅅㅔㅇㅛ");
assert_eq!(text.get_choseong(), "ㅇㄴㅎㅅㅇ");
assert_eq!(text.josa("을/를").unwrap(), "안녕하세요를");
assert_eq!(assemble("ㄱㅏㅂㅅ"), "값");Structs§
- Choseong
Match - Range of a choseong / progressive search hit inside a
Hangulvalue. - Hangul
- Parsed Hangul text: NFC syllables, NFD jamo clusters, and other characters.
- Hangul
Letter - One NFC or NFD Hangul syllable with choseong, jungseong, and optional jongseong.
- Hangul
Unit - One parsed slot in a
Hangulvalue: a Hangul syllable or a single other character.
Enums§
- Assemble
Policy - How to resolve a jamo that could be a compound batchim or the next syllable.
- Josa
Error - Failed josa lookup.
Functions§
- assemble
- Assemble compatibility jamo into syllables using
AssemblePolicy::PreferNextSyllable. - assemble_
with_ policy - Assemble compatibility jamo into syllables with an explicit
AssemblePolicy.