2 releases
new 0.1.1 | Feb 14, 2025 |
---|---|
0.1.0 | Feb 14, 2025 |
#4 in #dbg
166 downloads per month
8MB
693 lines
e2k-rs

英単語から読みを推論するライブラリ。 Patchethium氏のe2kをRustに移植したものです。
使い方
// 文字列をカタカナに変換する例
let src = "constants";
let c2k = e2k::C2k::new(32);
let dst = c2k.infer(src);
dbg!(dst); // "コンスタンツ"
// CMUDictの発音記号をカタカナに変換する例
let pronunciation = ["K", "AA1", "N", "S", "T", "AH0", "N", "T", "S"];
let p2k = e2k::P2k::new(32);
let dst = p2k.infer(&pronunciation);
dbg!(dst); // "コンスタンツ"
ライセンス
MIT License にて公開しています。
謝辞
モデルはPatchethium氏のものを使用しています。ありがとうございます。
e2k のライセンス
e2k は WTFPL にて公開されています。
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
Dependencies
~7–15MB
~197K SLoC