
ClassicFilter
- Namespace
- Rowles.LeanCorpus.Analysis.Filters
- Assembly
- Rowles.LeanCorpus.dll
Removes possessive endings and periods from acronyms, replicating Lucene's ClassicFilter.
public sealed class ClassicFilter : ISpanTokenFilter
- Inheritance
-
ClassicFilter
- Implements
Remarks
- Strips trailing
'sor'Sfrom tokens (English possessive). - Removes periods from tokens that consist entirely of uppercase letters and periods
(e.g.
"U.S.A."becomes"USA"). - Tokens that require neither transformation are forwarded unchanged with zero allocation.
Apply(ReadOnlySpan<char>, int, int, string, int, byte[]?, ISpanTokenSink)
Applies the filter to a token and emits the transformed token into sink.