pub struct LineSegmenter(LineSegmenter);Expand description
An ICU4X line-break segmenter, capable of finding breakpoints in strings.
Tuple Fields§
§0: LineSegmenterImplementations§
Source§impl LineSegmenter
impl LineSegmenter
Sourcepub fn create_auto() -> Box<LineSegmenter>
pub fn create_auto() -> Box<LineSegmenter>
Construct a LineSegmenter with default options (no locale-based tailoring) using compiled data. It automatically loads the best
available payload data for Burmese, Khmer, Lao, and Thai.
Sourcepub fn create_lstm() -> Box<LineSegmenter>
pub fn create_lstm() -> Box<LineSegmenter>
Construct a LineSegmenter with default options (no locale-based tailoring) and LSTM payload data for
Burmese, Khmer, Lao, and Thai, using compiled data.
Sourcepub fn create_dictionary() -> Box<LineSegmenter>
pub fn create_dictionary() -> Box<LineSegmenter>
Construct a LineSegmenter with default options (no locale-based tailoring) and dictionary payload data for
Burmese, Khmer, Lao, and Thai, using compiled data
Sourcepub fn create_for_non_complex_scripts() -> Box<LineSegmenter>
pub fn create_for_non_complex_scripts() -> Box<LineSegmenter>
Construct a LineSegmenter with default options (no locale-based tailoring) and no support for scripts requiring complex context dependent line breaks
(Burmese, Khmer, Lao, and Thai), using compiled data
Sourcepub fn create_auto_with_options_v2(
content_locale: Option<&Locale>,
options: LineBreakOptionsV2,
) -> Box<LineSegmenter>
pub fn create_auto_with_options_v2( content_locale: Option<&Locale>, options: LineBreakOptionsV2, ) -> Box<LineSegmenter>
Construct a LineSegmenter with custom options using compiled data. It automatically loads the best
available payload data for Burmese, Khmer, Lao, and Thai.
Sourcepub fn create_lstm_with_options_v2(
content_locale: Option<&Locale>,
options: LineBreakOptionsV2,
) -> Box<LineSegmenter>
pub fn create_lstm_with_options_v2( content_locale: Option<&Locale>, options: LineBreakOptionsV2, ) -> Box<LineSegmenter>
Construct a LineSegmenter with custom options and LSTM payload data for
Burmese, Khmer, Lao, and Thai, using compiled data.
Sourcepub fn create_dictionary_with_options_v2(
content_locale: Option<&Locale>,
options: LineBreakOptionsV2,
) -> Box<LineSegmenter>
pub fn create_dictionary_with_options_v2( content_locale: Option<&Locale>, options: LineBreakOptionsV2, ) -> Box<LineSegmenter>
Construct a LineSegmenter with custom options and dictionary payload data for
Burmese, Khmer, Lao, and Thai, using compiled data.
Sourcepub fn create_for_non_complex_scripts_with_options_v2(
content_locale: Option<&Locale>,
options: LineBreakOptionsV2,
) -> Box<LineSegmenter>
pub fn create_for_non_complex_scripts_with_options_v2( content_locale: Option<&Locale>, options: LineBreakOptionsV2, ) -> Box<LineSegmenter>
Construct a LineSegmenter with custom options and no support for scripts requiring complex context dependent line breaks
(Burmese, Khmer, Lao, and Thai), using compiled data.
Sourcepub fn segment_utf8<'a>(
&'a self,
input: &'a DiplomatStr,
) -> Box<LineBreakIteratorUtf8<'a>>
pub fn segment_utf8<'a>( &'a self, input: &'a DiplomatStr, ) -> Box<LineBreakIteratorUtf8<'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<LineBreakIteratorUtf16<'a>>
pub fn segment_utf16<'a>( &'a self, input: &'a DiplomatStr16, ) -> Box<LineBreakIteratorUtf16<'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<LineBreakIteratorLatin1<'a>>
pub fn segment_latin1<'a>( &'a self, input: &'a [u8], ) -> Box<LineBreakIteratorLatin1<'a>>
Segments a Latin-1 string.