Class LocalizedSegmenter

java.lang.Object
com.ibm.icu.segmenter.LocalizedSegmenter
All Implemented Interfaces:
Segmenter

public class LocalizedSegmenter extends Object implements Segmenter
Performs segmentation according to the rules defined for the locale.
  • Field Details

  • Constructor Details

  • Method Details

    • segment

      public Segments segment(CharSequence s)
      Returns a Segments object that encapsulates the segmentation of the input CharSequence. The Segments object, in turn, provides the main APIs to support traversal over the resulting segments and boundaries via the Java Stream abstraction.
      Specified by:
      segment in interface Segmenter
      Parameters:
      s - input CharSequence on which segmentation is performed. The input must not be modified while using the resulting Segments object.
      Returns:
      A Segments object with APIs to access the results of segmentation, including APIs that return Streams of the segments and boundaries.
    • builder

      public static LocalizedSegmenter.Builder builder()
      Returns:
      a builder for constructing LocalizedSegmenter