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.
NOTE: This class uses the same Version
dependent settings as StandardAnalyzer
.
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
|
Modifier and Type | Method and Description |
---|---|
protected Analyzer.TokenStreamComponents |
createComponents(String fieldName)
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
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()
).public FrenchAnalyzer(CharArraySet stopwords)
stopwords
- a stopword setpublic FrenchAnalyzer(CharArraySet stopwords, CharArraySet stemExclutionSet)
stopwords
- a stopword setstemExclutionSet
- a stemming exclusion setpublic static CharArraySet getDefaultStopSet()
protected Analyzer.TokenStreamComponents createComponents(String fieldName)
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-2015 Apache Software Foundation. All Rights Reserved.