public final class FrenchAnalyzer extends StopwordAnalyzerBase
Analyzer
for French 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 FrenchAnalyzer:
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 CharArraySet |
DEFAULT_ARTICLES
Default set of articles for ElisionFilter
|
static String |
DEFAULT_STOPWORD_FILE
File containing default French stopwords.
|
stopwords
GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY
Constructor and Description |
---|
FrenchAnalyzer()
Builds an analyzer with the default stop words (
getDefaultStopSet() ). |
FrenchAnalyzer(CharArraySet stopwords)
Builds an analyzer with the given stop words
|
FrenchAnalyzer(CharArraySet stopwords,
CharArraySet stemExclutionSet)
Builds an analyzer with the given stop words
|
FrenchAnalyzer(Version matchVersion)
Deprecated.
Use
FrenchAnalyzer() |
FrenchAnalyzer(Version matchVersion,
CharArraySet stopwords)
Deprecated.
|
FrenchAnalyzer(Version matchVersion,
CharArraySet stopwords,
CharArraySet stemExclutionSet)
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 an unmodifiable instance of the default stop-words set.
|
getStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet, loadStopwordSet
close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, setVersion, tokenStream, tokenStream
public static final String DEFAULT_STOPWORD_FILE
public static final CharArraySet DEFAULT_ARTICLES
public FrenchAnalyzer()
getDefaultStopSet()
).@Deprecated public FrenchAnalyzer(Version matchVersion)
FrenchAnalyzer()
public FrenchAnalyzer(CharArraySet stopwords)
stopwords
- a stopword set@Deprecated public FrenchAnalyzer(Version matchVersion, CharArraySet stopwords)
FrenchAnalyzer(CharArraySet)
public FrenchAnalyzer(CharArraySet stopwords, CharArraySet stemExclutionSet)
stopwords
- a stopword setstemExclutionSet
- a stemming exclusion set@Deprecated public FrenchAnalyzer(Version matchVersion, CharArraySet stopwords, CharArraySet stemExclutionSet)
FrenchAnalyzer(CharArraySet,CharArraySet)
public static 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
, ElisionFilter
,
LowerCaseFilter
, StopFilter
,
SetKeywordMarkerFilter
if a stem exclusion set is
provided, and FrenchLightStemFilter
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.