X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/459ab3bbdcafec8707764896dcfeec5c3ed7454d..9963261d8d572f7a0d88ef27f5d938f085c603ba:/nominatim/tokenizer/legacy_tokenizer.py diff --git a/nominatim/tokenizer/legacy_tokenizer.py b/nominatim/tokenizer/legacy_tokenizer.py index 848d6191..f52eaada 100644 --- a/nominatim/tokenizer/legacy_tokenizer.py +++ b/nominatim/tokenizer/legacy_tokenizer.py @@ -7,7 +7,8 @@ """ Tokenizer implementing normalisation as used before Nominatim 4. """ -from typing import Optional, Sequence, List, Tuple, Mapping, Any, Callable, cast, Dict, Set +from typing import Optional, Sequence, List, Tuple, Mapping, Any, Callable, \ + cast, Dict, Set, Iterable from collections import OrderedDict import logging from pathlib import Path @@ -392,7 +393,7 @@ class LegacyNameAnalyzer(AbstractAnalyzer): - def update_special_phrases(self, phrases: Sequence[Tuple[str, str, str, str]], + def update_special_phrases(self, phrases: Iterable[Tuple[str, str, str, str]], should_replace: bool) -> None: """ Replace the search index for special phrases with the new phrases. """