
StopWordFilter
- Namespace
- Rowles.LeanLucene.Analysis.Filters
- Assembly
- Rowles.LeanLucene.dll
Removes common English stop words from a token list using a frozen set for fast, allocation-free lookups.
public sealed class StopWordFilter : ITokenFilter
StopWordFilter
- Implements
Constructors
StopWordFilter()
Initialises a new StopWordFilter using the default English stop word list.
StopWordFilter(IEnumerable<string>?)
Initialises a new StopWordFilter with a custom stop word list.
Fields
DefaultStopWords
Built-in English stop word list.
Methods
Apply(List<Token>)
Applies the filter to the token list, modifying it in place.
IsStopWord(ReadOnlySpan<char>)
Returns true if the given term span is a stop word (zero-alloc).
IsStopWord(string)
Returns true if the given term is a stop word.