5 releases (1 stable)

1.0.0 Jun 23, 2020
0.3.0 Jul 28, 2019
0.2.1 Jul 10, 2019
0.2.0 Jul 7, 2019
0.1.0 Jul 6, 2019

#2112 in Text processing

Download history 603/week @ 2024-12-11 385/week @ 2024-12-18 142/week @ 2024-12-25 203/week @ 2025-01-01 426/week @ 2025-01-08 427/week @ 2025-01-15 390/week @ 2025-01-22 342/week @ 2025-01-29 449/week @ 2025-02-05 509/week @ 2025-02-12 419/week @ 2025-02-19 522/week @ 2025-02-26 336/week @ 2025-03-05 407/week @ 2025-03-12 336/week @ 2025-03-19 432/week @ 2025-03-26

1,602 downloads per month

MIT license

5MB
66K SLoC

C++ 66K SLoC // 0.0% comments Rust 229 SLoC // 0.0% comments Jupyter Notebooks 120 SLoC // 0.2% comments

Build Status Documentation

BlingFire in Rust

blingfire is a thin Rust wrapper for the BlingFire tokenization library.

Add the library to Cargo.toml to get started

cargo add blingfire

The library exposes two functions text_to_words and text_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.");
}

The code is licensed under the MIT License.

Dependencies