Class StopFilter
Removes stop words from a token stream.
You must specify the required Lucene
- As of 3.1, StopFilter correctly handles Unicode 4.0 supplementary characters in stopwords and position increments are preserved
Implements
Inherited Members
Namespace: Lucene.Net.Analysis.Core
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public sealed class StopFilter : FilteringTokenFilter, IDisposable
Constructors
| Improve this Doc View SourceStopFilter(LuceneVersion, TokenStream, CharArraySet)
Constructs a filter which removes words from the input Token
Declaration
public StopFilter(LuceneVersion matchVersion, TokenStream in, CharArraySet stopWords)
Parameters
Type | Name | Description |
---|---|---|
Lucene |
matchVersion | Lucene version to enable correct Unicode 4.0 behavior in the stop
set if Version > 3.0. See Lucene |
Token |
in | Input Token |
Char |
stopWords | A Char |
See Also
Methods
| Improve this Doc View SourceAccept()
Returns the next input Token whose Term is not a stop word.
Declaration
protected override bool Accept()
Returns
Type | Description |
---|---|
System. |
Overrides
| Improve this Doc View SourceMakeStopSet(LuceneVersion, String[])
Builds a CharstopWords
construction to be cached once when
an Analyzer is constructed.
Declaration
public static CharArraySet MakeStopSet(LuceneVersion matchVersion, params string[] stopWords)
Parameters
Type | Name | Description |
---|---|---|
Lucene |
matchVersion | Lucene |
System. |
stopWords | An array of stopwords |
Returns
Type | Description |
---|---|
Char |
See Also
| Improve this Doc View SourceMakeStopSet(LuceneVersion, String[], Boolean)
Creates a stopword set from the given stopword array.
Declaration
public static CharArraySet MakeStopSet(LuceneVersion matchVersion, string[] stopWords, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
Lucene |
matchVersion | Lucene |
System. |
stopWords | An array of stopwords |
System. |
ignoreCase | If true, all words are lower cased first. |
Returns
Type | Description |
---|---|
Char |
a Set (Char |
MakeStopSet<T1>(LuceneVersion, IList<T1>)
Builds a CharstopWords
construction to be cached once when
an Analyzer is constructed.
Declaration
public static CharArraySet MakeStopSet<T1>(LuceneVersion matchVersion, IList<T1> stopWords)
Parameters
Type | Name | Description |
---|---|---|
Lucene |
matchVersion | Lucene |
IList<T1> | stopWords | A List of |
Returns
Type | Description |
---|---|
Char |
A Set (Char |
Type Parameters
Name | Description |
---|---|
T1 |
See Also
| Improve this Doc View SourceMakeStopSet<T1>(LuceneVersion, IList<T1>, Boolean)
Creates a stopword set from the given stopword list.
Declaration
public static CharArraySet MakeStopSet<T1>(LuceneVersion matchVersion, IList<T1> stopWords, bool ignoreCase)
Parameters
Type | Name | Description |
---|---|---|
Lucene |
matchVersion | Lucene |
IList<T1> | stopWords | A List of |
System. |
ignoreCase | if true, all words are lower cased first |
Returns
Type | Description |
---|---|
Char |
A Set (Char |
Type Parameters
Name | Description |
---|---|
T1 |