Package opennlp.tools.util.featuregen
Class StringPattern
java.lang.Object
opennlp.tools.util.featuregen.StringPattern
Recognizes predefined patterns in strings.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
boolean
boolean
boolean
int
digits()
Retrieves the number of digits.boolean
boolean
boolean
boolean
boolean
boolean
boolean
static StringPattern
-
Method Details
-
recognize
-
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()
-