public class DictionaryLemmatizer extends Object implements Lemmatizer
| Constructor and Description | 
|---|
DictionaryLemmatizer(InputStream dictionary)
Construct a hashmap from the input tab separated dictionary. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
apply(String word,
     String postag)
Lookup lemma in a dictionary. 
 | 
Map<List<String>,String> | 
getDictMap()
Get the Map containing the dictionary. 
 | 
String[] | 
lemmatize(String[] tokens,
         String[] postags)
Generates lemma tags for the word and postag returning the result in an array. 
 | 
public DictionaryLemmatizer(InputStream dictionary)
dictionary - the input dictionary via inputstreampublic Map<List<String>,String> getDictMap()
public String[] lemmatize(String[] tokens, String[] postags)
Lemmatizerlemmatize in interface Lemmatizertokens - an array of the tokenspostags - an array of the pos tagsCopyright © 2017 The Apache Software Foundation. All rights reserved.