FileDocCategorySizeDatePackage
StandardAnalyzer.javaAPI DocApache Lucene 1.4.31864Tue Mar 30 00:48:02 BST 2004org.apache.lucene.analysis.standard

StandardAnalyzer

public class StandardAnalyzer extends Analyzer
Filters {@link StandardTokenizer} with {@link StandardFilter}, {@link LowerCaseFilter} and {@link StopFilter}.
version
$Id: StandardAnalyzer.java,v 1.8 2004/03/29 22:48:01 cutting Exp $

Fields Summary
private Set
stopSet
public static final String[]
STOP_WORDS
An array containing some common English words that are usually not useful for searching.
Constructors Summary
public StandardAnalyzer()
Builds an analyzer.


      
    
    this(STOP_WORDS);
  
public StandardAnalyzer(String[] stopWords)
Builds an analyzer with the given stop words.

    stopSet = StopFilter.makeStopSet(stopWords);
  
Methods Summary
public org.apache.lucene.analysis.TokenStreamtokenStream(java.lang.String fieldName, java.io.Reader reader)
Constructs a {@link StandardTokenizer} filtered by a {@link StandardFilter}, a {@link LowerCaseFilter} and a {@link StopFilter}.

    TokenStream result = new StandardTokenizer(reader);
    result = new StandardFilter(result);
    result = new LowerCaseFilter(result);
    result = new StopFilter(result, stopSet);
    return result;