irg-kvariants

Crates.ioirg-kvariants
lib.rsirg-kvariants
version0.1.0
sourcesrc
created_at2023-02-15 15:26:29.6838
updated_at2023-02-15 15:26:29.6838
descriptionA simple wrapper around kvariant from hfhchan/irg
homepage
repositoryhttps://github.com/meilisearch/charabia
max_upload_size
id785804
size346,325
(meili-bot)

documentation

README

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 dictionnary, 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.

Commit count: 769

cargo fmt