Section navigation

Public classSealed KeepWordFilter

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

Removes any token whose text is not present in the configured keep-word set.

public sealed class KeepWordFilter : ISpanTokenFilter
Inheritance
KeepWordFilter
Implements

Public constructor KeepWordFilter(IEnumerable<string>)

Initialises a new KeepWordFilter.

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

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