org.apache.lucene.analysis.standard

Class StandardAnalyzer


public class StandardAnalyzer
extends Analyzer

Filters StandardTokenizer with StandardFilter, LowerCaseFilter and StopFilter, using a list of English stop words.
Version:
$Id: StandardAnalyzer.java 472959 2006-11-09 16:21:50Z yonik $

Field Summary

static String[]
STOP_WORDS
An array containing some common English words that are usually not useful for searching.

Constructor Summary

StandardAnalyzer()
Builds an analyzer with the default stop words (STOP_WORDS).
StandardAnalyzer(File stopwords)
Builds an analyzer with the stop words from the given file.
StandardAnalyzer(Reader stopwords)
Builds an analyzer with the stop words from the given reader.
StandardAnalyzer(Set stopWords)
Builds an analyzer with the given stop words.
StandardAnalyzer(String[] stopWords)
Builds an analyzer with the given stop words.

Method Summary

TokenStream
tokenStream(String fieldName, Reader reader)
Constructs a StandardTokenizer filtered by a StandardFilter, a LowerCaseFilter and a StopFilter.

Methods inherited from class org.apache.lucene.analysis.Analyzer

getPositionIncrementGap, tokenStream

Field Details

STOP_WORDS

public static final String[] STOP_WORDS
An array containing some common English words that are usually not useful for searching.

Constructor Details

StandardAnalyzer

public StandardAnalyzer()

StandardAnalyzer

public StandardAnalyzer(File stopwords)
            throws IOException
Builds an analyzer with the stop words from the given file.

StandardAnalyzer

public StandardAnalyzer(Reader stopwords)
            throws IOException
Builds an analyzer with the stop words from the given reader.

StandardAnalyzer

public StandardAnalyzer(Set stopWords)
Builds an analyzer with the given stop words.

StandardAnalyzer

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

Method Details

tokenStream

public TokenStream tokenStream(String fieldName,
                               Reader reader)
Constructs a StandardTokenizer filtered by a StandardFilter, a LowerCaseFilter and a StopFilter.
Overrides:
tokenStream in interface Analyzer

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.