Package com.ibm.icu.segmenter
Class RuleBasedSegmenter
- java.lang.Object
-
- com.ibm.icu.segmenter.RuleBasedSegmenter
-
- All Implemented Interfaces:
Segmenter
public class RuleBasedSegmenter extends Object implements Segmenter
Performs segmentation according to the provided rule string. The rule string must follow the same guidelines as forRuleBasedBreakIterator(String).- Status:
- Draft ICU 78.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRuleBasedSegmenter.BuilderBuilder forRuleBasedSegmenter
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RuleBasedSegmenter.Builderbuilder()Segmentssegment(CharSequence s)Returns aSegmentsobject that encapsulates the segmentation of the inputCharSequence.
-
-
-
Method Detail
-
segment
public Segments segment(CharSequence s)
Returns aSegmentsobject that encapsulates the segmentation of the inputCharSequence. TheSegmentsobject, in turn, provides the main APIs to support traversal over the resulting segments and boundaries via the JavaStreamabstraction.- Specified by:
segmentin interfaceSegmenter- Parameters:
s- inputCharSequenceon which segmentation is performed. The input must not be modified while using the resultingSegmentsobject.- Returns:
- A
Segmentsobject with APIs to access the results of segmentation, including APIs that returnStreams of the segments and boundaries. - Status:
- Draft ICU 78.
-
builder
public static RuleBasedSegmenter.Builder builder()
- Returns:
- a builder for constructing
RuleBasedSegmenter - Status:
- Draft ICU 78.
-
-