introduce mutation variants to generic token analyser

Mutations are regular-expression-based replacements that are applied
after variants have been computed. They are meant to be used for
variations on character level.

Add spelling variations for German umlauts.
This commit is contained in:
Sarah Hoffmann
2022-01-12 16:25:47 +01:00
parent 0192a7af96
commit b453b0ea95
5 changed files with 233 additions and 7 deletions

View File

@@ -59,6 +59,13 @@ token-analysis:
mode: variant-only
variants:
- !include icu-rules/variants-de.yaml
mutations:
- pattern: ä
replacements: ["ä", "ae"]
- pattern: ö
replacements: ["ö", "oe"]
- pattern: ü
replacements: ["ü", "ue"]
- id: el
analyzer: generic
mode: variant-only