public class IllinoisLemmatizer extends Annotator
config, isInitialized, requiredViews, viewName
Constructor and Description |
---|
IllinoisLemmatizer()
default configuration, lazily initialized
|
IllinoisLemmatizer(boolean isLazilyInitialized)
default parameters, but set whether lazily initialized or not
|
IllinoisLemmatizer(ResourceManager nonDefaultRm)
Override default config parameters with properties in rm.
|
Modifier and Type | Method and Description |
---|---|
void |
addView(TextAnnotation textAnnotation)
create and add the view named by getViewName() to the TextAnnotation argument.
|
View |
createLemmaView(TextAnnotation inputTa)
create a Lemma view in the TextAnnotation argument, and return a reference to that View.
|
String |
getLemma(String word,
String pos)
gets the lemma (root form) corresponding to the specified word having the specified part of
speech.
|
String |
getLemma(TextAnnotation ta,
int tokIndex)
get a lemma for the token at index tokIndex in TextAnnotation ta.
|
String |
getSingleLemma(TextAnnotation ta,
int tokIndex)
Deprecated.
|
void |
initialize(ResourceManager rm)
loads resources used by lemmatizer.
|
static void |
main(String[] args) |
static List<String> |
readFromClasspath(String filename) |
doInitialize, getRequiredViews, getTagValues, getView, getViewName, isInitialized, isSentenceLevel
public IllinoisLemmatizer()
public IllinoisLemmatizer(boolean isLazilyInitialized)
isLazilyInitialized
- if 'true', defer loading resources until getView() is called.public IllinoisLemmatizer(ResourceManager nonDefaultRm)
nonDefaultRm
- non-default configuration paramspublic static void main(String[] args)
public void initialize(ResourceManager rm)
initialize
in class Annotator
rm
- configuration parameterspublic String getLemma(TextAnnotation ta, int tokIndex)
ta
- TextAnnotation to query for lemma; MUST have POS view.tokIndex
- token index for word to lemmatize@Deprecated public String getSingleLemma(TextAnnotation ta, int tokIndex)
ta
- TextAnnotation to query. MUST have POS view.tokIndex
- index of word to lemmatize.public String getLemma(String word, String pos)
word
- Word to lemmatizepos
- Part-of-speech of wordpublic View createLemmaView(TextAnnotation inputTa) throws IOException
IOException
public void addView(TextAnnotation textAnnotation) throws AnnotatorException
Annotator
addView
in class Annotator
textAnnotation
- the TextAnnotation to modify.AnnotatorException
Copyright © 2017. All rights reserved.