Package opennlp.tools.tokenize
Interface Detokenizer
- All Known Implementing Classes:
DictionaryDetokenizer
public interface Detokenizer
A
Detokenizer
merges tokens back to their detokenized representation.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
This enum contains an operation for every token to merge the tokens together to their detokenized form. -
Method Summary
Modifier and TypeMethodDescriptiondetokenize
(String[] tokens) Detokenizes the collection of tokens.detokenize
(String[] tokens, String splitMarker) Detokenizes the inputtokens
into a String.
-
Method Details
-
detokenize
Detokenizes the collection of tokens.- Parameters:
tokens
- The elements which should be detokenized.- Returns:
- The
merge operations
to handle giventokens
.
-
detokenize
Detokenizes the inputtokens
into a String. Tokens which are connected without awhitespace
character in between can be separated by a givensplitMarker
.- Parameters:
tokens
- The elements which should be concatenated.splitMarker
- The split marker ornull
.- Returns:
- The concatenated tokens as a single string.
-