| java.lang.Object org.apache.lucene.analysis.TokenStream org.apache.lucene.analysis.TokenFilter org.apache.lucene.analysis.StopFilter
StopFilter | final public class StopFilter extends TokenFilter (Code) | | Removes stop words from a token stream.
|
Constructor Summary | |
public | StopFilter(TokenStream input, String[] stopWords) Construct a token stream filtering the given input. | public | 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. | public | StopFilter(TokenStream input, Set stopWords, boolean ignoreCase) Construct a token stream filtering the given input. | public | StopFilter(TokenStream in, Set stopWords) Constructs a filter which removes words from the input
TokenStream that are named in the Set. |
StopFilter | public StopFilter(TokenStream input, String[] stopWords)(Code) | | Construct a token stream filtering the given input.
|
StopFilter | public StopFilter(TokenStream in, String[] stopWords, boolean ignoreCase)(Code) | | Constructs a filter which removes words from the input
TokenStream that are named in the array of words.
|
StopFilter | public StopFilter(TokenStream input, Set stopWords, boolean ignoreCase)(Code) | | Construct a token stream filtering the given input.
If stopWords is an instance of
CharArraySet (true if
makeStopSet() was used to construct the set) it will be directly used
and ignoreCase will be ignored since CharArraySet
directly controls case sensitivity.
If stopWords is not an instance of
CharArraySet ,
a new CharArraySet will be constructed and ignoreCase will be
used to specify the case sensitivity of that set.
Parameters: input - Parameters: stopWords - The set of Stop Words. Parameters: ignoreCase - -Ignore case when stopping. |
getEnablePositionIncrements | public boolean getEnablePositionIncrements()(Code) | | See Also: #setEnablePositionIncrements(boolean). |
getEnablePositionIncrementsDefault | public static boolean getEnablePositionIncrementsDefault()(Code) | | See Also: #setEnablePositionIncrementsDefault(boolean). |
makeStopSet | final public static Set makeStopSet(String[] stopWords)(Code) | | Builds a Set from an array of stop words,
appropriate for passing into the StopFilter constructor.
This permits this stopWords construction to be cached once when
an Analyzer is constructed.
See Also: StopFilter.makeStopSet(java.lang.String[],boolean) See Also: passing false to ignoreCase |
makeStopSet | final public static Set makeStopSet(String[] stopWords, boolean ignoreCase)(Code) | | Parameters: stopWords - Parameters: ignoreCase - If true, all words are lower cased first. a Set containing the words |
setEnablePositionIncrements | public void setEnablePositionIncrements(boolean enable)(Code) | | Set to true to make this StopFilter enable position increments to result tokens.
When set, when a token is stopped (omitted), the position increment of
the following token is incremented.
Default: see
StopFilter.setEnablePositionIncrementsDefault(boolean) .
|
setEnablePositionIncrementsDefault | public static void setEnablePositionIncrementsDefault(boolean defaultValue)(Code) | | Set the default position increments behavior of every StopFilter created from now on.
Note: behavior of a single StopFilter instance can be modified
with
StopFilter.setEnablePositionIncrements(boolean) .
This static method allows control over behavior of classes using StopFilters internally,
for example
org.apache.lucene.analysis.standard.StandardAnalyzer StandardAnalyzer .
Default : false.
See Also: #setEnablePositionIncrements(boolean). |
|
|