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 TextTokenizer
seq
- the character sequence to tokenize.public TextGranularity granurality()
TextGranularity.WORD
.
Returns the text granularity of this tokenizer.granurality
in interface TextTokenizer
Copyright © 2007-2019. All Rights Reserved.