Package opennlp.tools.tokenize
Class DetokenizationDictionary
java.lang.Object
opennlp.tools.tokenize.DetokenizationDictionary
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionDetokenizationDictionary
(File file) Initializes aDetokenizationDictionary
instance via a validFile
.Initializes aDetokenizationDictionary
instance via a validInputStream
.DetokenizationDictionary
(String[] tokens, DetokenizationDictionary.Operation[] operations) Initializes aDetokenizationDictionary
instance.DetokenizationDictionary
(Path path) Initializes aDetokenizationDictionary
instance via a validPath
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
serialize
(OutputStream out) Serializes the current state of aDetokenizationDictionary
via anoutput stream
.
-
Constructor Details
-
DetokenizationDictionary
Initializes aDetokenizationDictionary
instance.- Parameters:
tokens
- An array of tokens that should be de-tokenized according tooperations
.operations
- An array of operations which specifies which operation should be used for the providedtokens
.
-
DetokenizationDictionary
Initializes aDetokenizationDictionary
instance via a validInputStream
.- Parameters:
in
- TheInputStream
used for loading the dictionary.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
DetokenizationDictionary
Initializes aDetokenizationDictionary
instance via a validFile
.- Parameters:
file
- TheFile
used for loading the dictionary.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
DetokenizationDictionary
Initializes aDetokenizationDictionary
instance via a validPath
.- Parameters:
path
- ThePath
used for loading the dictionary.- Throws:
IOException
- Thrown if IO errors occurred during initialization.
-
-
Method Details
-
serialize
Serializes the current state of aDetokenizationDictionary
via anoutput stream
.- Parameters:
out
- A valid, openOutputStream
ready to be used for serialization.- Throws:
IOException
- Thrown if IO errors occurred during serialization.
-