X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6e89310a9285f1ad15d8002bf68f578eada367a0..3acd7df5c44345ad85aa97a92d582c60a4eba240:/src/nominatim_db/tokenizer/icu_token_analysis.py?ds=sidebyside diff --git a/src/nominatim_db/tokenizer/icu_token_analysis.py b/src/nominatim_db/tokenizer/icu_token_analysis.py index fe6704d4..a3cdcb7a 100644 --- a/src/nominatim_db/tokenizer/icu_token_analysis.py +++ b/src/nominatim_db/tokenizer/icu_token_analysis.py @@ -14,8 +14,9 @@ from icu import Transliterator from .token_analysis.base import Analyzer if TYPE_CHECKING: - from typing import Any - from .icu_rule_loader import TokenAnalyzerRule # pylint: disable=cyclic-import + from typing import Any # noqa + from .icu_rule_loader import TokenAnalyzerRule + class ICUTokenAnalysis: """ Container class collecting the transliterators and token analysis @@ -35,7 +36,6 @@ class ICUTokenAnalysis: self.analysis = {name: arules.create(self.normalizer, self.to_ascii) for name, arules in analysis_rules.items()} - def get_analyzer(self, name: Optional[str]) -> Analyzer: """ Return the given named analyzer. If no analyzer with that name exists, return the default analyzer.