public final class IKTokenizer
extends org.apache.lucene.analysis.Tokenizer
| Constructor and Description |
|---|
IKTokenizer(Reader in,
boolean isMaxWordLength)
Lucene Tokenizer适配器类构造函数
|
| Modifier and Type | Method and Description |
|---|---|
void |
end() |
boolean |
incrementToken() |
void |
reset(Reader input) |
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toStringpublic IKTokenizer(Reader in, boolean isMaxWordLength)
in - isMaxWordLength - 当为true时,分词器进行最大词长切分;当为false是,采用最细粒度切分public final boolean incrementToken()
throws IOException
incrementToken in class org.apache.lucene.analysis.TokenStreamIOExceptionpublic void reset(Reader input) throws IOException
reset in class org.apache.lucene.analysis.TokenizerIOExceptionpublic final void end()
end in class org.apache.lucene.analysis.TokenStreamCopyright © 2022. All rights reserved.