pub struct SentenceSegmenter(SentenceSegmenter);Expand description
An ICU4X sentence-break segmenter, capable of finding sentence breakpoints in strings.
Tuple Fields§
§0: SentenceSegmenterImplementations§
Source§impl SentenceSegmenter
impl SentenceSegmenter
Sourcepub fn create() -> Box<SentenceSegmenter>
pub fn create() -> Box<SentenceSegmenter>
Construct a SentenceSegmenter using compiled data. This does not assume any content locale.
Sourcepub fn create_with_content_locale(
locale: &Locale,
) -> Result<Box<SentenceSegmenter>, DataError>
pub fn create_with_content_locale( locale: &Locale, ) -> Result<Box<SentenceSegmenter>, DataError>
Construct a SentenceSegmenter for content known to be of a given locale, using compiled data.
Sourcepub fn segment_utf8<'a>(
&'a self,
input: &'a DiplomatStr,
) -> Box<SentenceBreakIteratorUtf8<'a>>
pub fn segment_utf8<'a>( &'a self, input: &'a DiplomatStr, ) -> Box<SentenceBreakIteratorUtf8<'a>>
Segments a string.
Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
Sourcepub fn segment_utf16<'a>(
&'a self,
input: &'a DiplomatStr16,
) -> Box<SentenceBreakIteratorUtf16<'a>>
pub fn segment_utf16<'a>( &'a self, input: &'a DiplomatStr16, ) -> Box<SentenceBreakIteratorUtf16<'a>>
Segments a string.
Ill-formed input is treated as if errors had been replaced with REPLACEMENT CHARACTERs according to the WHATWG Encoding Standard.
Sourcepub fn segment_latin1<'a>(
&'a self,
input: &'a [u8],
) -> Box<SentenceBreakIteratorLatin1<'a>>
pub fn segment_latin1<'a>( &'a self, input: &'a [u8], ) -> Box<SentenceBreakIteratorLatin1<'a>>
Segments a Latin-1 string.
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