|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.tokenizer.TokenChunker
public class TokenChunker
A TokenChunker provides an implementationg of the Chunker interface based on an underlying tokenizer factory.
The chunkings produced will have one chunk per token produced by the underlying tokenizer factory, with start and end positions as determined by the tokenizer's start and end position methods. The type of the chunk will be the actual string yield of the token, which in the case of modifying tokenizers like stemmers, will not necessarily be the same as the underlying text span.
java.io.NotSerializableException. The
object read back in will be an instance of TokenChunker
constructed with the reconstituted tokenizer factory.
| Constructor Summary | |
|---|---|
TokenChunker(TokenizerFactory tokenizerFactory)
Construct a chunker from the specified tokenizer factory. |
|
| Method Summary | |
|---|---|
Chunking |
chunk(char[] cs,
int start,
int end)
Return the chunking produced by tokenizing the specified character array slice. |
Chunking |
chunk(CharSequence cSeq)
Return the chunking produced by tokenizing the specified character sequence. |
TokenizerFactory |
tokenizerFactory()
Return the tokenizer factory for this token chunker. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TokenChunker(TokenizerFactory tokenizerFactory)
tokenizerFactory - Tokenizer factory for this chunker.| Method Detail |
|---|
public TokenizerFactory tokenizerFactory()
public Chunking chunk(CharSequence cSeq)
chunk in interface ChunkercSeq - Character sequence to chunk.
public Chunking chunk(char[] cs,
int start,
int end)
chunk in interface Chunkercs - Underlying characters for slice.start - Index of first character in slice.end - Index of one past the last character in the slice.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||