pub struct SentenceSegmenter;Expand description
Splits text into sentences.
Currently stateless; a builder API will be added when configurable options (e.g., toggling newline splitting) are required.
use kham_core::sentence::SentenceSegmenter;
let seg = SentenceSegmenter::new();
let sents = seg.split("กินข้าว\nดื่มน้ำ");
assert_eq!(sents.len(), 2);Implementations§
Trait Implementations§
Source§impl Clone for SentenceSegmenter
impl Clone for SentenceSegmenter
Source§fn clone(&self) -> SentenceSegmenter
fn clone(&self) -> SentenceSegmenter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SentenceSegmenter
impl Debug for SentenceSegmenter
Source§impl Default for SentenceSegmenter
impl Default for SentenceSegmenter
Source§fn default() -> SentenceSegmenter
fn default() -> SentenceSegmenter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SentenceSegmenter
impl RefUnwindSafe for SentenceSegmenter
impl Send for SentenceSegmenter
impl Sync for SentenceSegmenter
impl Unpin for SentenceSegmenter
impl UnsafeUnpin for SentenceSegmenter
impl UnwindSafe for SentenceSegmenter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more