|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.tokenizer.CharacterTokenizerFactory
public class CharacterTokenizerFactory
A CharacterTokenizerFactory considers each
non-whitespace character in the input to be a distinct token. This
factory is useful for handling languages such as Chinese, which
includes thousands of characters and presents a difficult tokenization
problem for standard tokenizers.
| Field Summary | |
|---|---|
static TokenizerFactory |
FACTORY
A constant instance of a character tokenizer factory. |
| Constructor Summary | |
|---|---|
CharacterTokenizerFactory()
Construct a character tokenizer factory. |
|
| Method Summary | |
|---|---|
void |
compileTo(ObjectOutput objOut)
Compiles this tokenizer factory to the specified object output. |
Tokenizer |
tokenizer(char[] ch,
int start,
int length)
Returns a character tokenizer for the specified character array slice. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final TokenizerFactory FACTORY
| Constructor Detail |
|---|
public CharacterTokenizerFactory()
Implementation Note: All character tokenizer
factories behave the same way, and they are thread safe, so the
constant FACTORY may be used anywhere a freshly
constructed character tokenizer factory is used, without loss
of performance.
| Method Detail |
|---|
public Tokenizer tokenizer(char[] ch,
int start,
int length)
tokenizer in interface TokenizerFactorych - Characters to tokenize.start - Index of first character to tokenize.length - Number of characters to tokenize.
public void compileTo(ObjectOutput objOut)
throws IOException
FACTORY.
compileTo in interface CompilableobjOut - Object output to which this tokenizer factory is
compiled.
IOException - If there is an I/O error during the write.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||