X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/75c631f08093d0cc7330d313bd3bb58cb2c1924b..3bf3b894eaddd4f17f7e92353af6b2aa6200ab20:/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):