public final class CJKAnalyzer extends StopwordAnalyzerBase
Analyzer that tokenizes text with StandardTokenizer,
normalizes content with CJKWidthFilter, folds case with
LowerCaseFilter, forms bigrams of CJK with CJKBigramFilter,
and filters stopwords with StopFilterAnalyzer.GlobalReuseStrategy, Analyzer.PerFieldReuseStrategy, Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_STOPWORD_FILE
File containing default CJK stopwords.
|
matchVersion, stopwordsGLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY| Constructor and Description |
|---|
CJKAnalyzer(Version matchVersion)
Builds an analyzer which removes words in
getDefaultStopSet(). |
CJKAnalyzer(Version matchVersion,
CharArraySet stopwords)
Builds an analyzer with the given stop words
|
| Modifier and Type | Method and Description |
|---|---|
protected Analyzer.TokenStreamComponents |
createComponents(String fieldName,
Reader reader)
Creates a new
Analyzer.TokenStreamComponents instance for this analyzer. |
static CharArraySet |
getDefaultStopSet()
Returns an unmodifiable instance of the default stop-words set.
|
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSetclose, getOffsetGap, getPositionIncrementGap, getReuseStrategy, initReader, tokenStream, tokenStreampublic static final String DEFAULT_STOPWORD_FILE
public CJKAnalyzer(Version matchVersion)
getDefaultStopSet().public CJKAnalyzer(Version matchVersion, CharArraySet stopwords)
matchVersion - lucene compatibility versionstopwords - a stopword setpublic static CharArraySet getDefaultStopSet()
protected Analyzer.TokenStreamComponents createComponents(String fieldName, Reader reader)
AnalyzerAnalyzer.TokenStreamComponents instance for this analyzer.createComponents in class AnalyzerfieldName - the name of the fields content passed to the
Analyzer.TokenStreamComponents sink as a readerreader - the reader passed to the Tokenizer constructorAnalyzer.TokenStreamComponents for this analyzer.Copyright © 2000-2016 The Apache Software Foundation. All Rights Reserved.