Class StringPattern

java.lang.Object
opennlp.tools.util.featuregen.StringPattern

public class StringPattern extends Object
Recognizes predefined patterns in strings.
  • Method Details

    • recognize

      public static StringPattern recognize(String token)
    • isAllLetter

      public boolean isAllLetter()
      Returns:
      true if all characters are letters.
    • isInitialCapitalLetter

      public boolean isInitialCapitalLetter()
      Returns:
      true if first letter is capital.
    • isAllCapitalLetter

      public boolean isAllCapitalLetter()
      Returns:
      true if all letters are capital.
    • isAllLowerCaseLetter

      public boolean isAllLowerCaseLetter()
      Returns:
      true if all letters are lower case.
    • isAllDigit

      public boolean isAllDigit()
      Returns:
      true if all chars are digits.
    • isAllHiragana

      public boolean isAllHiragana()
      Returns:
      true if all chars are hiragana.
    • isAllKatakana

      public boolean isAllKatakana()
      Returns:
      true if all chars are katakana.
    • digits

      public int digits()
      Retrieves the number of digits.
    • containsPeriod

      public boolean containsPeriod()
    • containsComma

      public boolean containsComma()
    • containsSlash

      public boolean containsSlash()
    • containsDigit

      public boolean containsDigit()
    • containsHyphen

      public boolean containsHyphen()
    • containsLetters

      public boolean containsLetters()