hanja 0.1.1

Korean-Hanja(Chinese character for Korean language) dictionary
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 6.66 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.06 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 30s Average build duration of successful builds.
  • all releases: 30s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • bekker/hanja-rs
    9 1 1
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bekker

hanja-rs

Build Status

Korean-Hanja(Chinese character for Korean language) dictionary for Rust.

You can lookup Hanja for a given Hangeul syllable, like most of Korean IMEs do.

All Hanja entries are sorted by the use frequency of each.

Only syllables supported, not words(Hanjaeo).

Hashmap is precompiled fast using phf, taking only a few seconds.

Hanja dictionary and frequency data credited to libhangul and its contributors.

[dependencies]
hanja = "0.1.1"

Usage

extern crate hanja;

fn main() {
    for &(hanja, desc) in hanja::get('').unwrap().iter().take(10) {
        println!("{}: {}", hanja, desc);
    }

    let korea_in_hangeul = "대한민국";
    let korea_in_hanja = korea_in_hangeul.chars()
            .map(|c| hanja::get(c).unwrap()[0].0)
            .collect::<String>();
    println!("{}", korea_in_hanja); // 大韓民國
}
火: 불 화
花: 꽃 화
化: 될 화
話: 말할 화, 이야기 화
和: 화할 화
畵: 그림 화
華: 꽃 화, 빛날 화
貨: 재화 화, 재물 화
禍: 재화 화
禾: 벼 화
大韓民國

Documentation

Docs.rs

License

Distributed under MIT License