public final class GreekAnalyzer extends StopwordAnalyzerBase
Analyzer for the Greek language.
Supports an external list of stopwords (words that will not be indexed at all). A default set of stopwords is used unless an alternative list is specified.
NOTE: This class uses the same Version
dependent settings as StandardAnalyzer.
Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_STOPWORD_FILE
File containing default Greek stopwords.
|
stopwordsGLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY| Constructor and Description |
|---|
GreekAnalyzer()
Builds an analyzer with the default stop words.
|
GreekAnalyzer(CharArraySet stopwords)
Builds an analyzer with the given stop words.
|
| Modifier and Type | Method and Description |
|---|---|
protected Analyzer.TokenStreamComponents |
createComponents(java.lang.String fieldName)
Creates
Analyzer.TokenStreamComponents
used to tokenize all the text in the provided Reader. |
static CharArraySet |
getDefaultStopSet()
Returns a set of default Greek-stopwords
|
protected TokenStream |
normalize(java.lang.String fieldName,
TokenStream in)
Wrap the given
TokenStream in order to apply normalization filters. |
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSetattributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, initReaderForNormalization, normalize, setVersion, tokenStream, tokenStreampublic static final java.lang.String DEFAULT_STOPWORD_FILE
public GreekAnalyzer()
public GreekAnalyzer(CharArraySet stopwords)
NOTE: The stopwords set should be pre-processed with the logic of
GreekLowerCaseFilter for best results.
stopwords - a stopword setpublic static final CharArraySet getDefaultStopSet()
protected Analyzer.TokenStreamComponents createComponents(java.lang.String fieldName)
Analyzer.TokenStreamComponents
used to tokenize all the text in the provided Reader.createComponents in class AnalyzerfieldName - the name of the fields content passed to the
Analyzer.TokenStreamComponents sink as a readerAnalyzer.TokenStreamComponents
built from a StandardTokenizer filtered with
GreekLowerCaseFilter,
StopFilter, and GreekStemFilterprotected TokenStream normalize(java.lang.String fieldName, TokenStream in)
AnalyzerTokenStream in order to apply normalization filters.
The default implementation returns the TokenStream as-is. This is
used by Analyzer.normalize(String, String).Copyright © 2000–2025 The Apache Software Foundation. All rights reserved.