org.apache.lucene.analysis
public final class StopFilter extends TokenFilter
Constructor Summary | |
---|---|
StopFilter(TokenStream in, String[] stopWords)
Constructs a filter which removes words from the input
TokenStream that are named in the array of words. | |
StopFilter(TokenStream in, Hashtable stopTable)
Constructs a filter which removes words from the input
TokenStream that are named in the Hashtable.
| |
StopFilter(TokenStream in, Set stopWords)
Constructs a filter which removes words from the input
TokenStream that are named in the Set.
|
Method Summary | |
---|---|
static Set | makeStopSet(String[] stopWords)
Builds a Set from an array of stop words,
appropriate for passing into the StopFilter constructor.
|
static Hashtable | makeStopTable(String[] stopWords)
Builds a Hashtable from an array of stop words,
appropriate for passing into the StopFilter constructor.
|
Token | next()
Returns the next input Token whose termText() is not a stop word. |
Deprecated: Use {@link #StopFilter(TokenStream, Set)} instead
Constructs a filter which removes words from the input TokenStream that are named in the Hashtable.See Also: (java.lang.String[])
Deprecated: Use {@link #makeStopSet(String[])} instead.
Builds a Hashtable from an array of stop words, appropriate for passing into the StopFilter constructor. This permits this table construction to be cached once when an Analyzer is constructed.