Crates.io | irg-kvariants |
lib.rs | irg-kvariants |
version | 0.1.1 |
source | src |
created_at | 2023-02-15 15:26:29.6838 |
updated_at | 2024-07-04 09:15:06.542469 |
description | A simple wrapper around kvariant from hfhchan/irg |
homepage | |
repository | https://github.com/meilisearch/charabia |
max_upload_size | |
id | 785804 |
size | 346,323 |
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.
use kvariants::KVARIANTS;
let c = '澚';
let kvariant = match KVARIANTS.get(&c) {
Some(kvariant) => kvariant.destination_ideograph,
None => c,
};
assert_eq!(kvariant, '澳');
The dictionary file is vendored into dictionaries/source/
and can be updated with bin/sync_dictionaries
.