Section navigation

Public classSealed LengthFilter

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

Removes tokens whose text length falls outside an inclusive range.

public sealed class LengthFilter : ISpanTokenFilter
Inheritance
LengthFilter
Implements

Public constructor LengthFilter(int, int)

Initialises a new LengthFilter with inclusive minimum and maximum lengths.

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

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