
MappingCharFilter
- Namespace
- Rowles.LeanCorpus.Analysis.Filters
- Assembly
- Rowles.LeanCorpus.dll
Maps specific characters or strings to replacements using a lookup table. Useful for normalising special characters (e.g., smart quotes → straight quotes).
public sealed class MappingCharFilter : ICharFilter
- Inheritance
-
MappingCharFilter
- Implements
MappingCharFilter(IReadOnlyDictionary<string, string>)
Initialises a new MappingCharFilter with the specified character mappings.
Filter(ReadOnlySpan<char>)
Transforms the input text, returning filtered text ready for tokenisation.