Section navigation

Public classSealed TruncateTokenFilter

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

Truncates token text to a maximum character length.

public sealed class TruncateTokenFilter : ISpanTokenFilter
Inheritance
TruncateTokenFilter
Implements

Public constructor TruncateTokenFilter(int)

Initialises a new TruncateTokenFilter with the specified maximum length.

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

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