Class RuleBasedSegmenter
java.lang.Object
com.ibm.icu.segmenter.RuleBasedSegmenter
- All Implemented Interfaces:
Segmenter
Performs segmentation according to the provided rule string. The rule string must follow the
same guidelines as for
RuleBasedBreakIterator(String).-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RuleBasedSegmenter.Builderbuilder()Returns aSegmentsobject that encapsulates the segmentation of the inputCharSequence.
-
Field Details
-
breakIterPrototype
-
-
Constructor Details
-
RuleBasedSegmenter
-
-
Method Details
-
segment
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.
-
builder
- Returns:
- a builder for constructing
RuleBasedSegmenter
-