X-Git-Url: https://git.openstreetmap.org/nominatim.git/blobdiff_plain/459ab3bbdcafec8707764896dcfeec5c3ed7454d..9963261d8d572f7a0d88ef27f5d938f085c603ba:/nominatim/tokenizer/base.py diff --git a/nominatim/tokenizer/base.py b/nominatim/tokenizer/base.py index afcb0864..1c1ca9f7 100644 --- a/nominatim/tokenizer/base.py +++ b/nominatim/tokenizer/base.py @@ -9,7 +9,7 @@ Abstract class defintions for tokenizers. These base classes are here mainly for documentation purposes. """ from abc import ABC, abstractmethod -from typing import List, Tuple, Dict, Any, Optional +from typing import List, Tuple, Dict, Any, Optional, Iterable from pathlib import Path from typing_extensions import Protocol @@ -81,7 +81,8 @@ class AbstractAnalyzer(ABC): @abstractmethod - def update_special_phrases(self, phrases: List[Tuple[str, str, str, str]], + def update_special_phrases(self, + phrases: Iterable[Tuple[str, str, str, str]], should_replace: bool) -> None: """ Update the tokenizer's special phrase tokens from the given list of special phrases.