Closeable
, AutoCloseable
public final class GreekAnalyzer
extends org.apache.lucene.analysis.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
.
Modifier and Type | Field | Description |
---|---|---|
static String |
DEFAULT_STOPWORD_FILE |
File containing default Greek stopwords.
|
Constructor | Description |
---|---|
GreekAnalyzer(org.apache.lucene.util.Version matchVersion) |
Builds an analyzer with the default stop words.
|
GreekAnalyzer(org.apache.lucene.util.Version matchVersion,
String... stopwords) |
Deprecated.
use
GreekAnalyzer(Version, Set) instead |
GreekAnalyzer(org.apache.lucene.util.Version matchVersion,
Map<?,?> stopwords) |
Deprecated.
use
GreekAnalyzer(Version, Set) instead |
GreekAnalyzer(org.apache.lucene.util.Version matchVersion,
Set<?> stopwords) |
Builds an analyzer with the given stop words.
|
Modifier and Type | Method | Description |
---|---|---|
protected org.apache.lucene.analysis.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
|
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setPreviousTokenStream
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final String DEFAULT_STOPWORD_FILE
public GreekAnalyzer(org.apache.lucene.util.Version matchVersion)
matchVersion
- Lucene compatibility version,
See abovepublic GreekAnalyzer(org.apache.lucene.util.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(org.apache.lucene.util.Version matchVersion, String... stopwords)
GreekAnalyzer(Version, Set)
insteadstopwords
- Array of stopwords to use.@Deprecated public GreekAnalyzer(org.apache.lucene.util.Version matchVersion, Map<?,?> stopwords)
GreekAnalyzer(Version, Set)
insteadpublic static final Set<?> getDefaultStopSet()
protected org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents createComponents(String fieldName, Reader reader)
ReusableAnalyzerBase.TokenStreamComponents
used to tokenize all the text in the provided Reader
.createComponents
in class org.apache.lucene.analysis.ReusableAnalyzerBase
ReusableAnalyzerBase.TokenStreamComponents
built from a StandardTokenizer
filtered with
GreekLowerCaseFilter
, StandardFilter
,
StopFilter
, and GreekStemFilter
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.