fr.paris.lutece.plugins.lucene.service.analyzer
Class LuteceFrenchAnalyzer

java.lang.Object
  extended by org.apache.lucene.analysis.Analyzer
      extended by fr.paris.lutece.plugins.lucene.service.analyzer.LuteceFrenchAnalyzer

public class LuteceFrenchAnalyzer
extends org.apache.lucene.analysis.Analyzer

FrenchAnalyzer, adding ElisionFilter and ASCIIFoldingFilter.

  1. StandardTokenizer
  2. ElisionFilter
  3. StandardFilter
  4. StopFilter
  5. ASCIIFoldingFilter
  6. FrenchStemFilter
  7. LowerCaseFilter

See Also:
FrenchAnalyzer, ElisionFilter, ASCIIFoldingFilter, Analyzer

Field Summary
static java.lang.String[] FRENCH_STOP_WORDS
          Extended list of typical French stopwords.
 
Fields inherited from class org.apache.lucene.analysis.Analyzer
overridesTokenStreamMethod
 
Constructor Summary
LuteceFrenchAnalyzer()
          Deprecated. Use LuteceFrenchAnalyzer(Version) instead.
LuteceFrenchAnalyzer(java.io.File stopwords)
          Deprecated. Use LuteceFrenchAnalyzer(Version, File) instead
LuteceFrenchAnalyzer(java.lang.String[] stopwords)
          Deprecated. Use LuteceFrenchAnalyzer(Version, String[]) instead.
LuteceFrenchAnalyzer(org.apache.lucene.util.Version matchVersion)
          Builds an analyzer with the default stop words (FRENCH_STOP_WORDS).
LuteceFrenchAnalyzer(org.apache.lucene.util.Version matchVersion, java.io.File stopwords)
          Builds an analyzer with the given stop words.
LuteceFrenchAnalyzer(org.apache.lucene.util.Version matchVersion, java.lang.String[] stopwords)
          Builds an analyzer with the given stop words.
 
Method Summary
 org.apache.lucene.analysis.TokenStream reusableTokenStream(java.lang.String fieldName, java.io.Reader 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)
          
 
Methods inherited from class org.apache.lucene.analysis.Analyzer
close, getOffsetGap, getPositionIncrementGap, getPreviousTokenStream, setOverridesTokenStreamMethod, setPreviousTokenStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FRENCH_STOP_WORDS

public static final java.lang.String[] FRENCH_STOP_WORDS
Extended list of typical French stopwords.

Constructor Detail

LuteceFrenchAnalyzer

public LuteceFrenchAnalyzer()
Deprecated. Use LuteceFrenchAnalyzer(Version) instead.

Builds an analyzer with the default stop words (FRENCH_STOP_WORDS).


LuteceFrenchAnalyzer

public LuteceFrenchAnalyzer(org.apache.lucene.util.Version matchVersion)
Builds an analyzer with the default stop words (FRENCH_STOP_WORDS).

Parameters:
matchVersion - the version

LuteceFrenchAnalyzer

public LuteceFrenchAnalyzer(java.lang.String[] stopwords)
Deprecated. Use LuteceFrenchAnalyzer(Version, String[]) instead.

Builds an analyzer with the given stop words.

Parameters:
stopwords - the stop words

LuteceFrenchAnalyzer

public LuteceFrenchAnalyzer(org.apache.lucene.util.Version matchVersion,
                            java.lang.String[] stopwords)
Builds an analyzer with the given stop words.

Parameters:
matchVersion - the version
stopwords - the stop words

LuteceFrenchAnalyzer

public LuteceFrenchAnalyzer(java.io.File stopwords)
                     throws java.io.IOException
Deprecated. Use LuteceFrenchAnalyzer(Version, File) instead

Builds an analyzer with the given stop words.

Parameters:
stopwords - the stop words file
Throws:
java.io.IOException - io exception

LuteceFrenchAnalyzer

public LuteceFrenchAnalyzer(org.apache.lucene.util.Version matchVersion,
                            java.io.File stopwords)
                     throws java.io.IOException
Builds an analyzer with the given stop words.

Parameters:
matchVersion - the version
stopwords - the stop words
Throws:
java.io.IOException - io exception
Method Detail

setStemExclusionTable

public void setStemExclusionTable(java.lang.String[] exclusionlist)
Builds an exclusionlist from an array of Strings.

Parameters:
exclusionlist - the non "stemmable" words

setStemExclusionTable

public void setStemExclusionTable(java.util.Map exclusionlist)
Builds an exclusionlist from a Map.

Parameters:
exclusionlist - the non "stemmable" words

setStemExclusionTable

public void setStemExclusionTable(java.io.File exclusionlist)
                           throws java.io.IOException
Builds an exclusionlist from the words contained in the given file.

Parameters:
exclusionlist - file containing non stemmable words
Throws:
java.io.IOException - io exception

tokenStream

public final org.apache.lucene.analysis.TokenStream tokenStream(java.lang.String fieldName,
                                                                java.io.Reader reader)

Specified by:
tokenStream in class org.apache.lucene.analysis.Analyzer

reusableTokenStream

public org.apache.lucene.analysis.TokenStream reusableTokenStream(java.lang.String fieldName,
                                                                  java.io.Reader reader)
                                                           throws java.io.IOException

Overrides:
reusableTokenStream in class org.apache.lucene.analysis.Analyzer
Throws:
java.io.IOException


Copyright © 2011 Mairie de Paris. All Rights Reserved.