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.
You must specify the required Version
compatibility when creating GreekAnalyzer:
NOTE: This class uses the same Version
dependent settings as StandardAnalyzer.
ReusableAnalyzerBase.TokenStreamComponents| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_STOPWORD_FILE
File containing default Greek stopwords.
|
matchVersion, stopwords| Constructor and Description |
|---|
GreekAnalyzer(Version matchVersion)
Builds an analyzer with the default stop words.
|
GreekAnalyzer(Version matchVersion,
Map<?,?> stopwords)
Deprecated.
use
GreekAnalyzer(Version, Set) instead |
GreekAnalyzer(Version matchVersion,
Set<?> stopwords)
Builds an analyzer with the given stop words.
|
GreekAnalyzer(Version matchVersion,
String... stopwords)
Deprecated.
use
GreekAnalyzer(Version, Set) instead |
| Modifier and Type | Method and Description |
|---|---|
protected ReusableAnalyzerBase.TokenStreamComponents |
createComponents(String fieldName,
Reader reader)
Creates
ReusableAnalyzerBase.TokenStreamComponents
used to tokenize all the text in the provided Reader. |
static Set<?> |
getDefaultStopSet()
Returns a set of default Greek-stopwords
|
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSetinitReader, reusableTokenStream, tokenStreamclose, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStreampublic static final String DEFAULT_STOPWORD_FILE
public GreekAnalyzer(Version matchVersion)
matchVersion - Lucene compatibility version,
See abovepublic GreekAnalyzer(Version matchVersion, Set<?> stopwords)
NOTE: The stopwords set should be pre-processed with the logic of
GreekLowerCaseFilter for best results.
matchVersion - Lucene compatibility version,
See abovestopwords - a stopword set@Deprecated public GreekAnalyzer(Version matchVersion, String... stopwords)
GreekAnalyzer(Version, Set) insteadstopwords - Array of stopwords to use.@Deprecated public GreekAnalyzer(Version matchVersion, Map<?,?> stopwords)
GreekAnalyzer(Version, Set) insteadpublic static final Set<?> getDefaultStopSet()
protected ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
ReusableAnalyzerBase.TokenStreamComponents
used to tokenize all the text in the provided Reader.createComponents in class ReusableAnalyzerBasefieldName - the name of the fields content passed to the
ReusableAnalyzerBase.TokenStreamComponents sink as a readerreader - the reader passed to the Tokenizer constructorReusableAnalyzerBase.TokenStreamComponents
built from a StandardTokenizer filtered with
GreekLowerCaseFilter, StandardFilter,
StopFilter, and GreekStemFilter