opennlp.tools.util.featuregen
Class StringPattern

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

public class StringPattern
extends Object

Recognizes predefined patterns in strings.


Method Summary
 boolean containsComma()
           
 boolean containsDigit()
           
 boolean containsHyphen()
           
 boolean containsLetters()
           
 boolean containsPeriod()
           
 boolean containsSlash()
           
 int digits()
          Retrieves the number of digits.
 boolean isAllCapitalLetter()
           
 boolean isAllDigit()
           
 boolean isAllLowerCaseLetter()
           
 boolean isInitialCapitalLetter()
           
static StringPattern recognize(String token)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.