Crates.io | sentence_segmentation |
lib.rs | sentence_segmentation |
version | 1.0.3 |
source | src |
created_at | 2024-11-06 03:59:14.980149 |
updated_at | 2024-11-19 17:29:52.241914 |
description | A rule-based sentence_segmenter, inspired by ruby pragmatic segmenter by diasks2 (repo: https://github.com/diasks2/pragmatic_segmenter) |
homepage | |
repository | https://github.com/luxiant/sentence_segmentation |
max_upload_size | |
id | 1437587 |
size | 290,559 |
This is a regex rule-based sentence segmenter written in pure rust. This crate is inspired by the Ruby Pragmatic Segmenter by diasks2 (GitHub Repo).
processor::amharic
processor::afrikaans
processor::albanian
processor::arabic
processor::armenian
processor::azerbaijani
processor::basque
processor::belarusian
processor::bengali
processor::bosnian
processor::bulgarian
processor::catalan
processor::chinese
processor::croatian
processor::czech
processor::danish
processor::dutch
processor::english
processor::esperanto
processor::estonian
processor::finnish
processor::french
processor::ganda
processor::georgian
processor::german
processor::greek
processor::gujarati
processor::hausa
processor::hebrew
processor::hindi
processor::hungarian
processor::icelandic
processor::indonesian
processor::irish
processor::italian
processor::japanese
processor::kazakh
processor::korean
processor::latin
processor::latvian
processor::lithuanian
processor::macedonian
processor::malay
processor::maori
processor::marathi
processor::mongolian
processor::norwegian
processor::persian
processor::polish
processor::portuguese
processor::punjabi_eastern
processor::punjabi_western
processor::romanian
processor::russian
processor::serbian
processor::shona
processor::slovak
processor::slovenian
processor::somali
processor::sotho
processor::spanish
processor::swahili
processor::swedish
processor::tagalog
processor::tamil
processor::telugu
processor::tsonga
processor::tswana
processor::turkish
processor::ukrainian
processor::urdu
processor::vietnamese
processor::welsh
processor::xhosa
processor::yoruba
processor::zulu
To use this crate, add it to your Cargo.toml
dependencies:
[dependencies]
sentence_segmentation = "1.0.3"
use sentence_segmentation::processor;
fn main() {
let text = "이 크레이트는 자연어 처리를 위해서 만들어진 크레이트입니다. 정규표현식 기반의 간단한 알고리즘을 통해 문장 단위로 분리하기에 매우 빠른 속도로 문장을 분리할 수 있습니다. 이 크레이트는 기본적인 전처리도 같이 수행하므로 문장 분리가 목적이 아니더라도 전처리를 위해서 사용할 수도 있습니다.";
let sentences = processor::korean(text);
for sentence in sentences {
println!("{}", sentence);
}
// 이 크레이트는 자연어 처리를 위해서 만들어진 크레이트입니다.
// 정규표현식 기반의 간단한 알고리즘을 통해 문장 단위로 분리하기에 매우 빠른 속도로 문장을 분리할 수 있습니다.
// 이 크레이트는 기본적인 전처리도 같이 수행하므로 문장 분리가 목적이 아니더라도 전처리를 위해서 사용할 수도 있습니다.
}
This project is licensed under the MIT License. See the LICENSE file for details.