X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/19d4e047f6d3c525f64978e0965d75556bfc5b1e..cce0e5ea38fe3466e157651e789554d99fbdc8fe:/nominatim/tokenizer/place_sanitizer.py?ds=sidebyside 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):