X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9963261d8d572f7a0d88ef27f5d938f085c603ba..a0cd96e05ebad69c38f3406b40f5a6c615b40b4a:/nominatim/tools/special_phrases/sp_importer.py diff --git a/nominatim/tools/special_phrases/sp_importer.py b/nominatim/tools/special_phrases/sp_importer.py index 6ca6a1e1..06b59fd0 100644 --- a/nominatim/tools/special_phrases/sp_importer.py +++ b/nominatim/tools/special_phrases/sp_importer.py @@ -17,8 +17,6 @@ from typing import Iterable, Tuple, Mapping, Sequence, Optional, Set import logging import re -from typing_extensions import Protocol - from psycopg2.sql import Identifier, SQL from nominatim.config import Configuration @@ -26,6 +24,7 @@ from nominatim.db.connection import Connection from nominatim.tools.special_phrases.importer_statistics import SpecialPhrasesImporterStatistics from nominatim.tools.special_phrases.special_phrase import SpecialPhrase from nominatim.tokenizer.base import AbstractTokenizer +from nominatim.typing import Protocol LOG = logging.getLogger() @@ -60,7 +59,7 @@ class SPImporter(): self.black_list, self.white_list = self._load_white_and_black_lists() self.sanity_check_pattern = re.compile(r'^\w+$') # This set will contain all existing phrases to be added. - # It contains tuples with the following format: (lable, class, type, operator) + # It contains tuples with the following format: (label, class, type, operator) self.word_phrases: Set[Tuple[str, str, str, str]] = set() # This set will contain all existing place_classtype tables which doesn't match any # special phrases class/type on the wiki.