4 个版本
0.2.2 | 2021 年 1 月 10 日 |
---|---|
0.2.1 | 2020 年 12 月 30 日 |
0.2.0 | 2020 年 12 月 28 日 |
0.1.0 | 2020 年 12 月 27 日 |
1697 在 文本处理 中
20KB
381 行
MyStem Rust 包装器
Rust 包装器,用于 Yandex MyStem 3.1 俄罗斯语形态学分析器。
系统要求
该包装器在 Ubuntu Linux 18.04+、Windows 10 上进行了测试。Mystem 二进制文件应可通过 PATH 访问,因此需要手动安装。 MyStem 网站
快速示例
let mut instance = mystem::MyStem::new()?;
for stem in instance.stemming("Связался с лучшим - подохни как все.".into())? {
println!(
"'{}' most likely is a '{}' and lexeme is '{}'.",
stem.text,
stem.lex[0].grammem.part_of_speech,
stem.lex[0].lex
)
}
//'Связался' most likely is a 'Verb' and lexeme is 'связываться'.
//'с' most likely is a 'Preposition' and lexeme is 'с'.
//'лучшим' most likely is a 'Adjective' and lexeme is 'хороший'.
//'подохни' most likely is a 'Verb' and lexeme is 'подыхать'.
//'как' most likely is a 'Conjunction' and lexeme is 'как'.
//'все' most likely is a 'AdjectivePronoun' and lexeme is 'весь'.
依赖项
~0.6–1.2MB
~23K SLoC