public class Stemmer extends Object
do did does doing doneEach word is separated by whitepsace characters. First word is stem and other words are inflected word.
| Constructor and Description |
|---|
Stemmer() |
| Modifier and Type | Method and Description |
|---|---|
static Stemmer |
getDefaultStemmer()
Returns default stemmer.
|
String |
getStem(String word,
String pos)
Returns stem of
word |
void |
loadDictionary(File file)
Loads stem dictonary.
|
void |
loadDictionary(Reader reader) |
void |
tagStem(Document doc,
Span span)
Added stem feature to each token annotation if token text and stem are
difference.
|
public static Stemmer getDefaultStemmer()
public void loadDictionary(File file) throws IOException
file - IOExceptionpublic void loadDictionary(Reader reader) throws IOException
IOExceptionpublic void tagStem(Document doc, Span span)
doc - span - Copyright © 2016 New York University. All rights reserved.