X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8171fe4571a57bf8e5b2a8f676989e973897e2e7..a6dab5e300de9c5664f714eb2c9290d18f01067f:/nominatim/tokenizer/place_sanitizer.py diff --git a/nominatim/tokenizer/place_sanitizer.py b/nominatim/tokenizer/place_sanitizer.py index 5961dcf0..913b363c 100644 --- a/nominatim/tokenizer/place_sanitizer.py +++ b/nominatim/tokenizer/place_sanitizer.py @@ -1,3 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# This file is part of Nominatim. (https://nominatim.org) +# +# Copyright (C) 2022 by the Nominatim developer community. +# For a full list of authors see the git log. """ Handler for cleaning name and address tags in place information before it is handed to the token analysis. @@ -5,6 +11,7 @@ is handed to the token analysis. import importlib from nominatim.errors import UsageError +from nominatim.tokenizer.sanitizers.config import SanitizerConfig class PlaceName: """ A searchable name for a place together with properties. @@ -111,7 +118,7 @@ class PlaceSanitizer: raise UsageError("Sanitizer rule is missing the 'step' attribute.") module_name = 'nominatim.tokenizer.sanitizers.' + func['step'].replace('-', '_') handler_module = importlib.import_module(module_name) - self.handlers.append(handler_module.create(func)) + self.handlers.append(handler_module.create(SanitizerConfig(func))) def process_names(self, place):