X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8c14df55a61d71f2476c8a17287e1bd162a5c6a6..1f0796778754d8df0dfab9dd01302e26a397f064:/src/nominatim_db/tokenizer/token_analysis/config_variants.py diff --git a/src/nominatim_db/tokenizer/token_analysis/config_variants.py b/src/nominatim_db/tokenizer/token_analysis/config_variants.py index aff360af..7e181479 100644 --- a/src/nominatim_db/tokenizer/token_analysis/config_variants.py +++ b/src/nominatim_db/tokenizer/token_analysis/config_variants.py @@ -15,6 +15,7 @@ import re from ...config import flatten_config_list from ...errors import UsageError + class ICUVariant(NamedTuple): """ A single replacement rule for variant creation. """ @@ -64,7 +65,6 @@ class _VariantMaker: def __init__(self, normalizer: Any) -> None: self.norm = normalizer - def compute(self, rule: Any) -> Iterator[ICUVariant]: """ Generator for all ICUVariant tuples from a single variant rule. """ @@ -88,7 +88,6 @@ class _VariantMaker: for froms, tos in _create_variants(*src, repl, decompose): yield ICUVariant(froms, tos) - def _parse_variant_word(self, name: str) -> Optional[Tuple[str, str, str]]: name = name.strip() match = re.fullmatch(r'([~^]?)([^~$^]*)([~$]?)', name)