X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6e89310a9285f1ad15d8002bf68f578eada367a0..7c9002cae7f950a99f3045d3058ed61ef79fe044:/src/nominatim_db/tokenizer/place_sanitizer.py diff --git a/src/nominatim_db/tokenizer/place_sanitizer.py b/src/nominatim_db/tokenizer/place_sanitizer.py index da41692b..55e4a459 100644 --- a/src/nominatim_db/tokenizer/place_sanitizer.py +++ b/src/nominatim_db/tokenizer/place_sanitizer.py @@ -10,8 +10,8 @@ is handed to the token analysis. """ from typing import Optional, List, Mapping, Sequence, Callable, Any, Tuple -from nominatim_core.errors import UsageError -from nominatim_core.config import Configuration +from ..errors import UsageError +from ..config import Configuration from .sanitizers.config import SanitizerConfig from .sanitizers.base import SanitizerHandler, ProcessInfo from ..data.place_name import PlaceName @@ -35,11 +35,10 @@ class PlaceSanitizer: raise UsageError("'step' attribute must be a simple string.") module: SanitizerHandler = \ - config.load_plugin_module(func['step'], 'nominatim.tokenizer.sanitizers') + config.load_plugin_module(func['step'], 'nominatim_db.tokenizer.sanitizers') self.handlers.append(module.create(SanitizerConfig(func))) - def process_names(self, place: PlaceInfo) -> Tuple[List[PlaceName], List[PlaceName]]: """ Extract a sanitized list of names and address parts from the given place. The function returns a tuple