Crates.io | pragmatic-segmenter |
lib.rs | pragmatic-segmenter |
version | 0.1.3 |
source | src |
created_at | 2020-08-20 11:59:54.80333 |
updated_at | 2023-07-06 14:54:07.098095 |
description | Rust port of pySBD v3.1.0. |
homepage | https://github.com/simnalamburt/rust-pragmatic-segmenter |
repository | https://github.com/simnalamburt/rust-pragmatic-segmenter |
max_upload_size | |
id | 278603 |
size | 84,864 |
Rust port of pySBD v3.1.0 and Ruby pragmatic_segmenter. Documentations
rust-pragmatic-segmenter is rule-based SBD. It uses a lot of regular expressions to separate sentences.
use pragmatic_segmenter::Segmenter;
let segmenter = Segmenter::new()?;
let result: Vec<_> = segmenter.segment("Hi Mr. Kim. Let's meet at 3 P.M.").collect();
//=> vec!["Hi Mr. Kim. ", "Let's meet at 3 P.M."]
sudo apt install -y libclang-dev
cargo build
rust-pragmatic-segmenter is primarily distributed under the terms of both the Apache License (Version 2.0) and the MIT license. See COPYRIGHT for details.