Table of Contents

Public classSealed 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

Public constructor StopWordFilter()

Initialises a new StopWordFilter using the default English stop word list.

Public constructor StopWordFilter(IEnumerable<string>?)

Initialises a new StopWordFilter with a custom stop word list.

Fields

Public fieldStaticRead-only DefaultStopWords

Built-in English stop word list.

Methods

Public method Apply(List<Token>)

Applies the filter to the token list, modifying it in place.

Internal methodInternal IsStopWord(ReadOnlySpan<char>)

Returns true if the given term span is a stop word (zero-alloc).

Internal methodInternal IsStopWord(string)

Returns true if the given term is a stop word.