public class GermanAnalyzer extends 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.
|
overridesTokenStreamMethod
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(Version matchVersion)
Builds an analyzer with the default stop words:
GERMAN_STOP_WORDS . |
GermanAnalyzer(Version matchVersion,
java.io.File stopwords)
Builds an analyzer with the given stop words.
|
GermanAnalyzer(Version matchVersion,
java.util.Map stopwords)
Builds an analyzer with the given stop words.
|
GermanAnalyzer(Version matchVersion,
java.lang.String[] stopwords)
Builds an analyzer with the given stop words.
|
Modifier and Type | Method and Description |
---|---|
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.
|
TokenStream |
tokenStream(java.lang.String fieldName,
java.io.Reader reader)
Creates a
TokenStream which tokenizes all the text in the provided Reader . |
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStream
public static final java.lang.String[] GERMAN_STOP_WORDS
public GermanAnalyzer()
GermanAnalyzer(Version)
insteadGERMAN_STOP_WORDS
.public GermanAnalyzer(Version matchVersion)
GERMAN_STOP_WORDS
.public GermanAnalyzer(java.lang.String[] stopwords)
GermanAnalyzer(Version, String[])
insteadpublic GermanAnalyzer(Version matchVersion, java.lang.String[] stopwords)
public GermanAnalyzer(java.util.Map stopwords)
GermanAnalyzer(Version, Map)
insteadpublic GermanAnalyzer(Version matchVersion, java.util.Map stopwords)
public GermanAnalyzer(java.io.File stopwords) throws java.io.IOException
GermanAnalyzer(Version, File)
insteadjava.io.IOException
public GermanAnalyzer(Version matchVersion, java.io.File stopwords) throws java.io.IOException
java.io.IOException
public void setStemExclusionTable(java.lang.String[] exclusionlist)
public void setStemExclusionTable(java.util.Map exclusionlist)
Map
public void setStemExclusionTable(java.io.File exclusionlist) throws java.io.IOException
java.io.IOException
public TokenStream tokenStream(java.lang.String fieldName, java.io.Reader reader)
TokenStream
which tokenizes all the text in the provided Reader
.tokenStream
in class Analyzer
TokenStream
built from a StandardTokenizer
filtered with
StandardFilter
, LowerCaseFilter
, StopFilter
, and
GermanStemFilter
public 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 Analyzer
TokenStream
built from a StandardTokenizer
filtered with
StandardFilter
, LowerCaseFilter
, StopFilter
, and
GermanStemFilter
java.io.IOException
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.