🚧 [Experimental] Segment strings by lines, graphemes, word, and sentences.
This module is published as its own crate (icu_segmenter
)
and as part of the icu
crate. See the latter for more details on the ICU4X project.
This module contains segmenter implementation for the following rules.
Segment a string with default options:
```rust use icu::segmenter::LineSegmenter;
let segmenter = LineSegmenter::trynewunstable(&icu_testdata::unstable()) .expect("Data exists");
let breakpoints: Vec
See [LineSegmenter
] for more examples.
See [GraphemeClusterSegmenter
] for examples.
Segment a string:
```rust use icu::segmenter::WordSegmenter;
let segmenter = WordSegmenter::trynewunstable(&icu_testdata::unstable()) .expect("Data exists");
let breakpoints: Vec
See [WordSegmenter
] for more examples.
See [SentenceSegmenter
] for examples.
For more information on development, authorship, contributing etc. please visit ICU4X home page
.