org.apache.lucene.analysis
public final class StopFilter extends TokenFilter
Constructor Summary | |
---|---|
StopFilter(TokenStream input, String[] stopWords)
Construct a token stream filtering the given input. | |
StopFilter(TokenStream in, String[] stopWords, boolean ignoreCase)
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, Hashtable stopTable, boolean ignoreCase)
Constructs a filter which removes words from the input
TokenStream that are named in the Hashtable.
| |
StopFilter(TokenStream input, Set stopWords, boolean ignoreCase)
Construct a token stream filtering the given input. | |
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 Set | makeStopSet(String[] stopWords, boolean ignoreCase) |
static Hashtable | makeStopTable(String[] stopWords)
Builds a Hashtable from an array of stop words,
appropriate for passing into the StopFilter constructor.
|
static Hashtable | makeStopTable(String[] stopWords, boolean ignoreCase)
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 StopFilter instead
Constructs a filter which removes words from the input TokenStream that are named in the Hashtable.Deprecated: Use StopFilter instead
Constructs a filter which removes words from the input TokenStream that are named in the Hashtable. If ignoreCase is true, all keys in the stopTable should already be lowercased.Parameters: input stopWords The set of Stop Words, as Strings. If ignoreCase is true, all strings should be lower cased ignoreCase -Ignore case when stopping. The stopWords set must be setup to contain only lower case words
See Also: (java.lang.String[])
See Also: (java.lang.String[], boolean) passing false to ignoreCase
Parameters: stopWords ignoreCase If true, all words are lower cased first.
Returns: a Set containing the words
Deprecated: Use (String[])
instead.
Deprecated: Use (java.lang.String[], boolean)
instead.