opennlp.tools.util.featuregen
Class StringPattern
java.lang.Object
opennlp.tools.util.featuregen.StringPattern
public class StringPattern
- extends Object
Recognizes predefined patterns in strings.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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()
recognize
public static StringPattern recognize(String token)
Copyright © 2010. All Rights Reserved.