public final class StopFilter extends TokenFilter
input
Constructor and Description |
---|
StopFilter(TokenStream in,
Hashtable stopTable)
Deprecated.
Use
StopFilter(TokenStream, Set) instead |
StopFilter(TokenStream in,
Hashtable stopTable,
boolean ignoreCase)
Deprecated.
Use
StopFilter(TokenStream, Set) instead |
StopFilter(TokenStream in,
Set stopWords)
Constructs a filter which removes words from the input
TokenStream that are named in the Set.
|
StopFilter(TokenStream input,
Set stopWords,
boolean ignoreCase)
Construct a token stream filtering the given input.
|
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.
|
Modifier and Type | Method and Description |
---|---|
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)
Deprecated.
Use
makeStopSet(String[]) instead. |
static Hashtable |
makeStopTable(String[] stopWords,
boolean ignoreCase)
Deprecated.
Use
makeStopSet(java.lang.String[], boolean) instead. |
Token |
next()
Returns the next input Token whose termText() is not a stop word.
|
close
public StopFilter(TokenStream input, String[] stopWords)
public StopFilter(TokenStream in, String[] stopWords, boolean ignoreCase)
public StopFilter(TokenStream in, Hashtable stopTable)
StopFilter(TokenStream, Set)
insteadpublic StopFilter(TokenStream in, Hashtable stopTable, boolean ignoreCase)
StopFilter(TokenStream, Set)
insteadpublic StopFilter(TokenStream input, Set stopWords, boolean ignoreCase)
input
- stopWords
- The set of Stop Words, as Strings. If ignoreCase is true, all strings should be lower casedignoreCase
- -Ignore case when stopping. The stopWords set must be setup to contain only lower case wordspublic StopFilter(TokenStream in, Set stopWords)
makeStopSet(java.lang.String[])
public static final Hashtable makeStopTable(String[] stopWords)
makeStopSet(String[])
instead.public static final Hashtable makeStopTable(String[] stopWords, boolean ignoreCase)
makeStopSet(java.lang.String[], boolean)
instead.public static final Set makeStopSet(String[] stopWords)
passing false to ignoreCase
public static final Set makeStopSet(String[] stopWords, boolean ignoreCase)
stopWords
- ignoreCase
- If true, all words are lower cased first.public final Token next() throws IOException
next
in class TokenStream
IOException
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.