public class Dictionary extends Object implements opennlp.tools.util.model.SerializableArtifact
| Modifier and Type | Class and Description |
|---|---|
static class |
Dictionary.DictionarySerializer |
| Constructor and Description |
|---|
Dictionary(InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getArtifactSerializerClass() |
List<String> |
getBilouDictionaryMatch(String[] tokens)
Performs gazetteer match in a bilou encoding.
|
List<String> |
getBioDictionaryMatch(String[] tokens)
Performs gazetteer match in a bio encoding.
|
Map<String,String> |
getDict()
Get the Map String, String dictionary.
|
int |
getMaxTokenCount()
Get the key,value size of the dictionary.
|
String |
lookup(String string)
Look up a string in the dictionary.
|
void |
serialize(OutputStream out) |
public Dictionary(InputStream in) throws IOException
IOExceptionpublic String lookup(String string)
string - the string to be searchedpublic int getMaxTokenCount()
public final Map<String,String> getDict()
public List<String> getBioDictionaryMatch(String[] tokens)
tokens - the sentencepublic List<String> getBilouDictionaryMatch(String[] tokens)
tokens - the sentencepublic void serialize(OutputStream out) throws IOException
IOExceptionpublic Class<?> getArtifactSerializerClass()
getArtifactSerializerClass in interface opennlp.tools.util.model.SerializableArtifactCopyright © 2017 IXA pipes. All rights reserved.