Section navigation

Public classSealed PorterStemmerFilter

Namespace
Rowles.LeanCorpus.Analysis.Filters
Assembly
Rowles.LeanCorpus.dll

Porter Stemming Algorithm implementation as an ISpanTokenFilter. Based on the Porter 1980 specification for English stemming. Operates on tokens in-place, replacing text with stemmed form.

public sealed class PorterStemmerFilter : ISpanTokenFilter
Inheritance
PorterStemmerFilter
Implements

Public constructor PorterStemmerFilter()

Initialises a new PorterStemmerFilter that stems all tokens.

Public constructor PorterStemmerFilter(KeywordMarkerFilter?)

Initialises a new PorterStemmerFilter with optional keyword marker support.

Public method Apply(ReadOnlySpan<char>, int, int, string, int, byte[]?, ISpanTokenSink)

Applies the filter to a token and emits the transformed token into sink.