#dictionary #kvariants #kvariant #hfhchan-irg

irg-kvariants

A simple wrapper around kvariant from hfhchan/irg

2 releases

new 0.1.1 Jul 4, 2024
0.1.0 Feb 15, 2023

#44 in #dictionary

Download history 4325/week @ 2024-03-13 4208/week @ 2024-03-20 3503/week @ 2024-03-27 3587/week @ 2024-04-03 3504/week @ 2024-04-10 3530/week @ 2024-04-17 2904/week @ 2024-04-24 3725/week @ 2024-05-01 3252/week @ 2024-05-08 3137/week @ 2024-05-15 3440/week @ 2024-05-22 3399/week @ 2024-05-29 3746/week @ 2024-06-05 3229/week @ 2024-06-12 3494/week @ 2024-06-19 3444/week @ 2024-06-26

14,435 downloads per month
Used in 7 crates (via charabia)

MIT license

130KB
160 lines

kvariants

A Rust crate wrapping https://github.com/hfhchan/irg/blob/master/kVariants.md made by @hfhchan. If you want to participate in improving this dictionary, don't hesitate to create an issue or submit a PR directly on the dictionary repository.

Usage

use kvariants::KVARIANTS;

let c = '';

let kvariant = match KVARIANTS.get(&c) {
    Some(kvariant) => kvariant.destination_ideograph,
    None => c,
};

assert_eq!(kvariant, '');

Fetch latest dictionary from upstream

The dictionary file is vendored into dictionaries/source/ and can be updated with bin/sync_dictionaries.

Dependencies

~1.6–2.4MB
~37K SLoC