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