public class Morphology extends Object implements Function
java Morphology filename. In this case, POS tags MUST be
separated from words by an underscore ("_").
| Constructor and Description |
|---|
Morphology() |
Morphology(Reader in)
Process morphologically words from a Reader.
|
Morphology(Reader in,
int flags) |
| Modifier and Type | Method and Description |
|---|---|
Object |
apply(Object in)
Converts a T1 to a different T2.
|
String |
lemma(String word,
String tag) |
String |
lemma(String word,
String tag,
boolean lowercase) |
static String |
lemmaStatic(String word,
String tag,
boolean lowercase) |
static String |
lemmaStaticSynchronized(String word,
String tag,
boolean lowercase) |
WordLemmaTag |
lemmatize(WordTag wT)
Lemmatize returning a
WordLemmaTag . |
static WordLemmaTag |
lemmatizeStatic(WordTag wT) |
static void |
main(String[] args)
Run the morphological analyzer.
|
Word |
next() |
void |
stem(CoreLabel label)
Adds the LemmaAnnotation to the given CoreLabel.
|
void |
stem(CoreLabel label,
Class<? extends CoreAnnotation<String>> ann)
Adds annotation
ann to the given CoreLabel. |
String |
stem(String word) |
Word |
stem(Word w) |
static WordTag |
stemStatic(String word,
String tag)
Return a new WordTag which has the lemma as the value of word().
|
static WordTag |
stemStatic(WordTag wT)
Return a new WordTag which has the lemma as the value of word().
|
static WordTag |
stemStaticSynchronized(String word,
String tag) |
public Morphology()
public Morphology(Reader in)
in - The Reader to read frompublic Morphology(Reader in, int flags)
public Word next() throws IOException
IOExceptionpublic void stem(CoreLabel label)
public void stem(CoreLabel label, Class<? extends CoreAnnotation<String>> ann)
ann to the given CoreLabel.
Assumes that it has a TextAnnotation and PartOfSpeechAnnotation.public static WordTag stemStatic(String word, String tag)
public static String lemmaStaticSynchronized(String word, String tag, boolean lowercase)
public static WordTag stemStatic(WordTag wT)
public Object apply(Object in)
Functionpublic WordLemmaTag lemmatize(WordTag wT)
WordLemmaTag .public static WordLemmaTag lemmatizeStatic(WordTag wT)
public static void main(String[] args) throws IOException
IOException