5 个版本 (1 个稳定版)

1.0.1 2020 年 6 月 23 日
0.2.1 2019 年 7 月 10 日
0.2.0 2019 年 7 月 7 日
0.1.1 2019 年 7 月 6 日
0.1.0 2019 年 7 月 6 日

#844机器学习

Download history 270/week @ 2024-03-13 230/week @ 2024-03-20 284/week @ 2024-03-27 324/week @ 2024-04-03 299/week @ 2024-04-10 308/week @ 2024-04-17 328/week @ 2024-04-24 292/week @ 2024-05-01 406/week @ 2024-05-08 495/week @ 2024-05-15 429/week @ 2024-05-22 697/week @ 2024-05-29 827/week @ 2024-06-05 990/week @ 2024-06-12 779/week @ 2024-06-19 773/week @ 2024-06-26

每月下载量 3,558
用于 blingfire

MIT 许可证

5MB
66K SLoC

C++ 66K SLoC // 0.0% comments Jupyter Notebooks 121 SLoC // 0.2% comments Rust 69 SLoC

Build Status Documentation

Rust 中的 BlingFire

blingfire 是 BlingFire 分词库的薄 Rust 包装。

将库添加到 Cargo.toml 以开始使用

cargo add blingfire

库公开了两个函数 text_to_wordstext_to_sentences

use blingfire;

fn main() {
    let mut parsed = String::new();

    blingfire::text_to_words("Cat,sat on   the mat.", &mut parsed).unwrap();
    assert_eq!(parsed.as_str(), "Cat , sat on the mat .");

    blingfire::text_to_sentences("Cat sat. Dog barked.", &mut parsed).unwrap();
    assert_eq!(parsed.as_str(), "Cat sat.\nDog barked.");
}

代码采用 MIT 许可证。

依赖项