|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.uima.conceptMapper.support.tokens.TokenNormalizer
public class TokenNormalizer
| Field Summary | |
|---|---|
static String |
PARAM_CASE_MATCH
Configuration parameter key/label for the case matching string |
static String |
PARAM_STEMMER_CLASS
Configuration parameter key/label for the stemmer class spec. |
static String |
PARAM_STEMMER_DICT
Configuration parameter key/label for the stemmer dictionary, passed into the stemmer's initialization method |
| Constructor Summary | |
|---|---|
TokenNormalizer(org.apache.uima.analysis_engine.annotator.AnnotatorContext annotatorContext,
Logger logger)
|
|
| Method Summary | |
|---|---|
String |
foldCase(String token)
If one of the case folding flags is true and the input string matches the character pattern corresponding to that flag, then convert all letters to lowercase. |
Stemmer |
getStemmer()
|
boolean |
isCaseFoldAll()
|
boolean |
isCaseFoldDigit()
|
boolean |
isCaseFoldInitCap()
|
String |
normalize(String token)
|
void |
setCaseFoldAll(boolean caseFoldAll)
|
void |
setCaseFoldDigit(boolean caseFoldDigit)
|
void |
setCaseFoldInitCap(boolean caseFoldInitCap)
|
void |
setStemmer(Stemmer stemmer)
|
boolean |
shouldFoldCase(String token)
|
boolean |
shouldStem()
|
String |
stem(String token)
If the stemming flag is true, then return the stemmed form of the supplied word using the Porter stemmer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PARAM_CASE_MATCH
public static final String PARAM_STEMMER_CLASS
public static final String PARAM_STEMMER_DICT
| Constructor Detail |
|---|
public TokenNormalizer(org.apache.uima.analysis_engine.annotator.AnnotatorContext annotatorContext,
Logger logger)
throws org.apache.uima.analysis_engine.annotator.AnnotatorContextException
annotatorContext - logger -
org.apache.uima.analysis_engine.annotator.AnnotatorContextException| Method Detail |
|---|
public Stemmer getStemmer()
public void setStemmer(Stemmer stemmer)
stemmer - The stemmer to set.public boolean shouldStem()
public boolean isCaseFoldAll()
public void setCaseFoldAll(boolean caseFoldAll)
caseFoldAll - The caseFoldAll to set.public boolean isCaseFoldDigit()
public void setCaseFoldDigit(boolean caseFoldDigit)
caseFoldDigit - The caseFoldDigit to set.public boolean isCaseFoldInitCap()
public void setCaseFoldInitCap(boolean caseFoldInitCap)
caseFoldInitCap - The caseFoldInitCap to set.public boolean shouldFoldCase(String token)
public String foldCase(String token)
token - The string to case fold
public String stem(String token)
token - the word to stem
public String normalize(String token)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||