public final class GermanAnalyzer extends StopwordAnalyzerBase
Analyzer
for German language.
Supports an external list of stopwords (words that will not be indexed at all) and an external list of exclusions (word that will not be stemmed, but indexed). A default set of stopwords is used unless an alternative list is specified, but the exclusion list is empty by default.
You may specify the Version
compatibility when creating GermanAnalyzer:
NOTE: This class uses the same Version
dependent settings as StandardAnalyzer
.
Analyzer.GlobalReuseStrategy, Analyzer.PerFieldReuseStrategy, Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_STOPWORD_FILE
File containing default German stopwords.
|
stopwords
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
Constructor and Description |
---|
GermanAnalyzer()
Builds an analyzer with the default stop words:
getDefaultStopSet() . |
GermanAnalyzer(CharArraySet stopwords)
Builds an analyzer with the given stop words
|
GermanAnalyzer(CharArraySet stopwords,
CharArraySet stemExclusionSet)
Builds an analyzer with the given stop words
|
GermanAnalyzer(Version matchVersion)
Deprecated.
|
GermanAnalyzer(Version matchVersion,
CharArraySet stopwords)
Deprecated.
|
GermanAnalyzer(Version matchVersion,
CharArraySet stopwords,
CharArraySet stemExclusionSet)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected Analyzer.TokenStreamComponents |
createComponents(String fieldName,
Reader reader)
Creates
Analyzer.TokenStreamComponents
used to tokenize all the text in the provided Reader . |
static CharArraySet |
getDefaultStopSet()
Returns a set of default German-stopwords
|
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, setVersion, tokenStream, tokenStream
public static final String DEFAULT_STOPWORD_FILE
public GermanAnalyzer()
getDefaultStopSet()
.@Deprecated public GermanAnalyzer(Version matchVersion)
GermanAnalyzer()
public GermanAnalyzer(CharArraySet stopwords)
stopwords
- a stopword set@Deprecated public GermanAnalyzer(Version matchVersion, CharArraySet stopwords)
GermanAnalyzer(CharArraySet)
public GermanAnalyzer(CharArraySet stopwords, CharArraySet stemExclusionSet)
stopwords
- a stopword setstemExclusionSet
- a stemming exclusion set@Deprecated public GermanAnalyzer(Version matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
GermanAnalyzer(CharArraySet,CharArraySet)
public static final CharArraySet getDefaultStopSet()
protected Analyzer.TokenStreamComponents createComponents(String fieldName, Reader reader)
Analyzer.TokenStreamComponents
used to tokenize all the text in the provided Reader
.createComponents
in class Analyzer
Analyzer.TokenStreamComponents
built from a StandardTokenizer
filtered with
StandardFilter
, LowerCaseFilter
, StopFilter
, SetKeywordMarkerFilter
if a stem exclusion set is
provided, GermanNormalizationFilter
and GermanLightStemFilter
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.