X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4da4cbfe27a576ae011430b2de205c74435e241b..HEAD:/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)