Enum Class WordBreak

java.lang.Object
java.lang.Enum<WordBreak>
opennlp.tools.tokenize.uax29.WordBreak
All Implemented Interfaces:
Serializable, Comparable<WordBreak>, Constable

public enum WordBreak extends Enum<WordBreak>
The Unicode Word_Break property values, used by the UAX #29 word boundary algorithm.

OTHER is the default for code points that carry no Word_Break value in the Unicode Character Database. The remaining constants correspond one-to-one to the values in WordBreakProperty.txt (see UAX #29).

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Alphabetic letters.
    Carriage return (U+000D).
    The quotation mark (U+0022).
    Combining marks and other characters that extend the preceding one.
    Characters that extend a number or letter sequence (for example the low line).
    Format characters.
    Hebrew letters (distinguished so a single quote may join them).
    Katakana letters.
    Line feed (U+000A).
    Characters that join letters (for example the middle dot).
    Characters that join numbers (for example the comma).
    Characters that join letters or numbers (for example the full stop).
    Other mandatory line breaks (vertical tab, form feed, NEL, line/paragraph separators).
    Decimal digits.
    No assigned Word_Break value (the default).
    Regional indicator symbols (used in pairs for flag emoji).
    The apostrophe (U+0027).
    Whitespace that segments words (Word_Break=WSegSpace).
    Zero width joiner (U+200D).
  • Method Summary

    Modifier and Type
    Method
    Description
    static WordBreak
    Returns the enum constant of this class with the specified name.
    static WordBreak[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • OTHER

      public static final WordBreak OTHER
      No assigned Word_Break value (the default).
    • CR

      public static final WordBreak CR
      Carriage return (U+000D).
    • LF

      public static final WordBreak LF
      Line feed (U+000A).
    • NEWLINE

      public static final WordBreak NEWLINE
      Other mandatory line breaks (vertical tab, form feed, NEL, line/paragraph separators).
    • EXTEND

      public static final WordBreak EXTEND
      Combining marks and other characters that extend the preceding one.
    • ZWJ

      public static final WordBreak ZWJ
      Zero width joiner (U+200D).
    • REGIONAL_INDICATOR

      public static final WordBreak REGIONAL_INDICATOR
      Regional indicator symbols (used in pairs for flag emoji).
    • FORMAT

      public static final WordBreak FORMAT
      Format characters.
    • KATAKANA

      public static final WordBreak KATAKANA
      Katakana letters.
    • HEBREW_LETTER

      public static final WordBreak HEBREW_LETTER
      Hebrew letters (distinguished so a single quote may join them).
    • ALETTER

      public static final WordBreak ALETTER
      Alphabetic letters.
    • SINGLE_QUOTE

      public static final WordBreak SINGLE_QUOTE
      The apostrophe (U+0027).
    • DOUBLE_QUOTE

      public static final WordBreak DOUBLE_QUOTE
      The quotation mark (U+0022).
    • MID_NUM_LET

      public static final WordBreak MID_NUM_LET
      Characters that join letters or numbers (for example the full stop).
    • MID_LETTER

      public static final WordBreak MID_LETTER
      Characters that join letters (for example the middle dot).
    • MID_NUM

      public static final WordBreak MID_NUM
      Characters that join numbers (for example the comma).
    • NUMERIC

      public static final WordBreak NUMERIC
      Decimal digits.
    • EXTEND_NUM_LET

      public static final WordBreak EXTEND_NUM_LET
      Characters that extend a number or letter sequence (for example the low line).
    • WSEG_SPACE

      public static final WordBreak WSEG_SPACE
      Whitespace that segments words (Word_Break=WSegSpace).
  • Method Details

    • values

      public static WordBreak[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static WordBreak valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null