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.
NOTE: This class uses the same Version
 dependent settings as StandardAnalyzer.
Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents| Modifier and Type | Field and Description | 
|---|---|
| static String | DEFAULT_STOPWORD_FILEFile containing default German stopwords. | 
stopwordsGLOBAL_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 | 
| Modifier and Type | Method and Description | 
|---|---|
| protected Analyzer.TokenStreamComponents | createComponents(String fieldName)Creates
  Analyzer.TokenStreamComponentsused to tokenize all the text in the providedReader. | 
| static CharArraySet | getDefaultStopSet()Returns a set of default German-stopwords | 
| protected TokenStream | normalize(String fieldName,
         TokenStream in) | 
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSetattributeFactory, close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, initReaderForNormalization, normalize, setVersion, tokenStream, tokenStreampublic static final String DEFAULT_STOPWORD_FILE
public GermanAnalyzer()
getDefaultStopSet().public GermanAnalyzer(CharArraySet stopwords)
stopwords - a stopword setpublic GermanAnalyzer(CharArraySet stopwords, CharArraySet stemExclusionSet)
stopwords - a stopword setstemExclusionSet - a stemming exclusion setpublic static final CharArraySet getDefaultStopSet()
protected Analyzer.TokenStreamComponents createComponents(String fieldName)
Analyzer.TokenStreamComponents
 used to tokenize all the text in the provided Reader.createComponents in class AnalyzerAnalyzer.TokenStreamComponents
         built from a StandardTokenizer filtered with
         LowerCaseFilter, StopFilter
         , SetKeywordMarkerFilter if a stem exclusion set is
         provided, GermanNormalizationFilter and GermanLightStemFilterprotected TokenStream normalize(String fieldName, TokenStream in)
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.