|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectopennlp.tools.postag.ExtendedPOSDictionary
public class ExtendedPOSDictionary
Provides a means of determining which tags are valid for a particular word based on a tag dictionary read from a file.
Constructor Summary | |
---|---|
ExtendedPOSDictionary()
|
|
ExtendedPOSDictionary(boolean caseSensitive)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExtendedPOSDictionary()
public ExtendedPOSDictionary(boolean caseSensitive)
Method Detail |
---|
public String[] getTags(String word)
getTags
in interface opennlp.tools.postag.TagDictionary
word
- The word.
public String[] getFeatureTag(String word)
getFeatureTag
in interface ExtendedTagDictionary
public String[] getCompleteTag(String word)
getCompleteTag
in interface ExtendedTagDictionary
public Iterator<WordTag> iterator()
iterator
in interface Iterable<WordTag>
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 String toString()
toString
in class Object
public 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
-
IOException
opennlp.tools.util.InvalidFormatException
public String[] getFeatures(String word, String tag)
getFeatures
in interface FeatureDictionary
public String getLemma(String word, String tag)
getLemma
in interface ExtendedTagDictionary
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |