public class GermanAnalyzer
extends org.apache.lucene.analysis.Analyzer
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.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String[] |
GERMAN_STOP_WORDS
List of typical german stopwords.
|
| Constructor and Description |
|---|
GermanAnalyzer()
Deprecated.
Use
GermanAnalyzer(Version) instead |
GermanAnalyzer(java.io.File stopwords)
Deprecated.
Use
GermanAnalyzer(Version, File) instead |
GermanAnalyzer(java.util.Map stopwords)
Deprecated.
Use
GermanAnalyzer(Version, Map) instead |
GermanAnalyzer(java.lang.String[] stopwords)
Deprecated.
Use
GermanAnalyzer(Version, String[]) instead |
GermanAnalyzer(org.apache.lucene.util.Version matchVersion)
Builds an analyzer with the default stop words:
GERMAN_STOP_WORDS. |
GermanAnalyzer(org.apache.lucene.util.Version matchVersion,
java.io.File stopwords)
Builds an analyzer with the given stop words.
|
GermanAnalyzer(org.apache.lucene.util.Version matchVersion,
java.util.Map stopwords)
Builds an analyzer with the given stop words.
|
GermanAnalyzer(org.apache.lucene.util.Version matchVersion,
java.lang.String[] stopwords)
Builds an analyzer with the given stop words.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.analysis.TokenStream |
reusableTokenStream(java.lang.String fieldName,
java.io.Reader reader)
Returns a (possibly reused)
TokenStream which tokenizes all the text
in the provided Reader. |
void |
setStemExclusionTable(java.io.File exclusionlist)
Builds an exclusionlist from the words contained in the given file.
|
void |
setStemExclusionTable(java.util.Map exclusionlist)
Builds an exclusionlist from a
Map |
void |
setStemExclusionTable(java.lang.String[] exclusionlist)
Builds an exclusionlist from an array of Strings.
|
org.apache.lucene.analysis.TokenStream |
tokenStream(java.lang.String fieldName,
java.io.Reader reader)
Creates a
TokenStream which tokenizes all the text in the provided Reader. |
public static final java.lang.String[] GERMAN_STOP_WORDS
public GermanAnalyzer()
GermanAnalyzer(Version) insteadGERMAN_STOP_WORDS.public GermanAnalyzer(org.apache.lucene.util.Version matchVersion)
GERMAN_STOP_WORDS.public GermanAnalyzer(java.lang.String[] stopwords)
GermanAnalyzer(Version, String[]) insteadpublic GermanAnalyzer(org.apache.lucene.util.Version matchVersion,
java.lang.String[] stopwords)
public GermanAnalyzer(java.util.Map stopwords)
GermanAnalyzer(Version, Map) insteadpublic GermanAnalyzer(org.apache.lucene.util.Version matchVersion,
java.util.Map stopwords)
public GermanAnalyzer(java.io.File stopwords)
throws java.io.IOException
GermanAnalyzer(Version, File) insteadjava.io.IOExceptionpublic GermanAnalyzer(org.apache.lucene.util.Version matchVersion,
java.io.File stopwords)
throws java.io.IOException
java.io.IOExceptionpublic void setStemExclusionTable(java.lang.String[] exclusionlist)
public void setStemExclusionTable(java.util.Map exclusionlist)
Mappublic void setStemExclusionTable(java.io.File exclusionlist)
throws java.io.IOException
java.io.IOExceptionpublic org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName,
java.io.Reader reader)
TokenStream which tokenizes all the text in the provided Reader.tokenStream in class org.apache.lucene.analysis.AnalyzerTokenStream built from a StandardTokenizer filtered with
StandardFilter, LowerCaseFilter, StopFilter, and
GermanStemFilterpublic org.apache.lucene.analysis.TokenStream reusableTokenStream(java.lang.String fieldName,
java.io.Reader reader)
throws java.io.IOException
TokenStream which tokenizes all the text
in the provided Reader.reusableTokenStream in class org.apache.lucene.analysis.AnalyzerTokenStream built from a StandardTokenizer filtered with
StandardFilter, LowerCaseFilter, StopFilter, and
GermanStemFilterjava.io.IOExceptionCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.