#tokenize #dictionary #kvariants #irg #kvariant #hfhchan-irg

irg-kvariants

hfhchan/irg中的kvariant的一个简单包装

2个版本

0.1.1 2024年7月4日
0.1.0 2023年2月15日

#581 in 文本处理

Download history 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 3440/week @ 2024-06-26 2274/week @ 2024-07-03 2383/week @ 2024-07-10 2584/week @ 2024-07-17 2047/week @ 2024-07-24 2131/week @ 2024-07-31 2087/week @ 2024-08-07

9,290 每月下载量
7 个Crate中使用 (通过 charabia)

MIT 协议

130KB
160

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.

用法

use kvariants::KVARIANTS;

let c = '';

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

assert_eq!(kvariant, '');

从上游获取最新词典

词典文件已存入 dictionaries/source/,可通过 bin/sync_dictionaries 进行更新。

依赖

~1.5–2.3MB
~35K SLoC