public final class TokenizerByWord extends Object implements TextTokenizer
This class is not synchronized.
| Constructor and Description |
|---|
TokenizerByWord(WhiteSpaceProcessing whitespace)
Creates a new tokenizer.
|
| Modifier and Type | Method and Description |
|---|---|
TextGranularity |
granurality()
Always
TextGranularity.WORD. |
List<TextEvent> |
tokenize(CharSequence seq)
Returns the list of
TextEvent corresponding to the specified character sequence. |
public TokenizerByWord(WhiteSpaceProcessing whitespace)
whitespace - the whitespace processing for this tokenizer.NullPointerException - if the white space processing is not specified.public List<TextEvent> tokenize(CharSequence seq)
TextEvent corresponding to the specified character sequence.tokenize in interface TextTokenizerseq - the character sequence to tokenize.public TextGranularity granurality()
TextGranularity.WORD.
Returns the text granularity of this tokenizer.granurality in interface TextTokenizerCopyright © 2007-2022. All Rights Reserved.