Constructor StopFilter
StopFilter(Boolean, TokenStream, ISet<String>, Boolean)
Construct a token stream filtering the given input.
If stopWords
is an instance of CharmakeStopSet()
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 CharignoreCase
will be
used to specify the case sensitivity of that set.
Declaration
public StopFilter(bool enablePositionIncrements, TokenStream input, ISet<string> stopWords, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
System. |
enablePositionIncrements | true if token positions should record the removed stop words |
Token |
input | Input TokenStream |
ISet<System. |
stopWords | A Set of strings or strings or char[] or any other ToString()-able set representing the stopwords |
System. |
ignoreCase | if true, all words are lower cased first |
StopFilter(Boolean, TokenStream, ISet<String>)
Constructs a filter which removes words from the input TokenStream that are named in the Set.
Declaration
public StopFilter(bool enablePositionIncrements, TokenStream in, ISet<string> stopWords)
Parameters
Type | Name | Description |
---|---|---|
System. |
enablePositionIncrements | true if token positions should record the removed stop words |
Token |
in | Input stream |
ISet<System. |
stopWords | A Set of strings or char[] or any other ToString()-able set representing the stopwords |