public class ExtendedPOSDictionary extends Object implements Iterable<WordTag>, ExtendedTagDictionary
| Constructor and Description |
|---|
ExtendedPOSDictionary() |
ExtendedPOSDictionary(boolean caseSensitive) |
| Modifier and Type | Method and Description |
|---|---|
static ExtendedPOSDictionary |
create(InputStream in)
Creates a new
ExtendedPOSDictionary from a provided
InputStream. |
String[] |
getCompleteTag(String word) |
String[] |
getFeatures(String word,
String tag) |
String[] |
getFeatureTag(String word) |
String |
getLemma(String word,
String tag) |
String[] |
getTags(String word)
Returns a list of valid tags for the specified word.
|
Iterator<WordTag> |
iterator()
Retrieves an iterator over all words in the dictionary.
|
void |
serialize(OutputStream out)
Writes the
ExtendedPOSDictionary to the given OutputStream;
After the serialization is finished the provided OutputStream
remains open. |
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic ExtendedPOSDictionary()
public ExtendedPOSDictionary(boolean caseSensitive)
public String[] getTags(String word)
getTags in interface opennlp.tools.postag.TagDictionaryword - The word.public String[] getFeatureTag(String word)
getFeatureTag in interface ExtendedTagDictionarypublic String[] getCompleteTag(String word)
getCompleteTag in interface ExtendedTagDictionarypublic Iterator<WordTag> iterator()
public void serialize(OutputStream out) throws IOException
ExtendedPOSDictionary to the given OutputStream;
After the serialization is finished the provided OutputStream
remains open.out - the OutputStream to write the dictionary into.IOException - if writing to the OutputStream failspublic static ExtendedPOSDictionary create(InputStream in) throws IOException, opennlp.tools.util.InvalidFormatException
ExtendedPOSDictionary from a provided
InputStream.
After creation is finished the provided InputStream is closed.in - IOExceptionopennlp.tools.util.InvalidFormatExceptionpublic String[] getFeatures(String word, String tag)
getFeatures in interface FeatureDictionarypublic String getLemma(String word, String tag)
getLemma in interface ExtendedTagDictionaryCopyright © 2012–2017 CoGrOO. All rights reserved.