Class StringDictionary
java.lang.Object
opennlp.uima.normalizer.StringDictionary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(StringList key) Retrieves a value from a dictionary via itskey.(package private) Iterator<StringList> iterator()voidput(StringList key, String value) Adds a new entry to the dictionary.voidserialize(OutputStream out) Writes the dictionary to the givenOutputStream.
-
Field Details
-
entries
-
-
Constructor Details
-
StringDictionary
public StringDictionary() -
StringDictionary
InitializesStringDictionaryvia a specifiedInputStream.- Parameters:
in- A valid, openInputStreamto initialize with.- Throws:
IOException- Thrown if IO errors occurred.
-
-
Method Details
-
get
Retrieves a value from a dictionary via itskey.- Parameters:
key- Thekeyto get value with.- Returns:
- Retrieves a corresponding String value or
nullif not found.
-
put
Adds a new entry to the dictionary.- Parameters:
key- Thekeyunder which to put thevalue.value- The value to put.
-
iterator
Iterator<StringList> iterator() -
serialize
Writes the dictionary to the givenOutputStream.- Parameters:
out- A valid, openOutputStreamto serialize to.- Throws:
IOException- Thrown if IO errors occurred during serialization.
-