public class DictionaryLemmatizer extends Object implements opennlp.tools.util.model.SerializableArtifact
| Modifier and Type | Class and Description |
|---|---|
static class |
DictionaryLemmatizer.DictionaryLemmatizerSerializer |
| Constructor and Description |
|---|
DictionaryLemmatizer(InputStream in)
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.
|
Class<?> |
getArtifactSerializerClass() |
Map<List<String>,String> |
getDictMap()
Get the Map containing the dictionary.
|
List<String> |
lemmatize(String[] tokens,
Span[] postags) |
void |
serialize(OutputStream out) |
public DictionaryLemmatizer(InputStream in) throws IOException
in - the input dictionary via inputstreamIOException - if io problemspublic Map<List<String>,String> getDictMap()
public String apply(String word, String postag)
word - the tokenpostag - the postagpublic void serialize(OutputStream out) throws IOException
IOExceptionpublic Class<?> getArtifactSerializerClass()
getArtifactSerializerClass in interface opennlp.tools.util.model.SerializableArtifactCopyright © 2017 IXA pipes. All rights reserved.