|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.process.Morphology
public class Morphology
Morphology computes the base form of English words, by removing just inflections (not derivational morphology). It is based on a finite-state transducer implemented by John Carroll et al., written in flex and publicly available. There are several ways of invoking Morphology. One is by calling the static methods WordTag stemStatic(String word, String tag) or WordTag stemStatic(WordTag wordTag). If we have created a Morphology object already we can use the methods WordTag stem(String word, string tag) or WordTag stem(WordTag wordTag).
Another way of using Morphology is to run it on an input file by runningjava Morphology filename
Constructor Summary | |
---|---|
Morphology()
|
|
Morphology(Reader in)
Process morphologically words from a Reader. |
|
Morphology(String filename)
|
Method Summary | |
---|---|
Object |
apply(Object in)
Converts a T1 to a different T2. |
WordLemmaTag |
lemmatize(WordTag wT)
Lemmatize returning a WordLemmaTag . |
static WordLemmaTag |
lemmatizeStatic(WordTag wT)
|
static void |
main(String[] args)
|
Word |
next()
|
WordTag |
stem(String word,
String oldTag)
|
static WordTag |
stem(String word,
String oldTag,
edu.stanford.nlp.process.Morpha lexer)
|
Word |
stem(Word w)
|
WordTag |
stem(WordTag wT)
|
static WordTag |
stemStatic(String word,
String tag)
|
static WordTag |
stemStatic(WordTag wT)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Morphology()
public Morphology(Reader in)
public Morphology(String filename)
Method Detail |
---|
public Word next() throws IOException
IOException
public Word stem(Word w)
public WordTag stem(WordTag wT)
public WordTag stem(String word, String oldTag)
public static WordTag stem(String word, String oldTag, edu.stanford.nlp.process.Morpha lexer)
public static WordTag stemStatic(String word, String tag)
public static WordTag stemStatic(WordTag wT)
public Object apply(Object in)
Function
apply
in interface Function
public WordLemmaTag lemmatize(WordTag wT)
WordLemmaTag
.
public static WordLemmaTag lemmatizeStatic(WordTag wT)
public static void main(String[] args) throws IOException
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |