fr.paris.lutece.plugins.ods.service.search
Class SearchAnalyser
java.lang.Object
org.apache.lucene.analysis.Analyzer
fr.paris.lutece.plugins.ods.service.search.SearchAnalyser
public final class SearchAnalyser
- extends org.apache.lucene.analysis.Analyzer
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, the
exclusion list is empty by default.
- Version:
- $Id: FrenchAnalyzer.java 472959 2006-11-09 16:21:50Z yonik $
- Author:
- Patrick Talbot (based on Gerhard Schwarz's work for German)
|
Field Summary |
static java.lang.String[] |
FRENCH_STOP_WORDS
Extended list of typical French stopwords. |
|
Method Summary |
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. |
| Methods inherited from class org.apache.lucene.analysis.Analyzer |
close, getPositionIncrementGap, getPreviousTokenStream, reusableTokenStream, setPreviousTokenStream |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FRENCH_STOP_WORDS
public static final java.lang.String[] FRENCH_STOP_WORDS
- Extended list of typical French stopwords.
SearchAnalyser
public SearchAnalyser()
- Builds an analyzer with the default stop words (
FRENCH_STOP_WORDS).
SearchAnalyser
public SearchAnalyser(java.lang.String[] stopwords)
- Builds an analyzer with the given stop words.
- Parameters:
stopwords - the list of stop words
tokenStream
public 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.
- Specified by:
tokenStream in class org.apache.lucene.analysis.Analyzer
- Parameters:
fieldName - the field namereader - the reader
- Returns:
- A TokenStream build from a StandardTokenizer filtered with
StandardFilter, StopFilter, FrenchStemFilter and LowerCaseFilter
Copyright © 2010 Mairie de Paris. All Rights Reserved.