harmonize interface of token analysis module

The configure() function now receives a Transliterator object instead
of the ICU rules. This harmonizes the parameters with the create
function.
This commit is contained in:
Sarah Hoffmann
2022-07-29 10:43:07 +02:00
parent f0d640961a
commit c8873d34af
8 changed files with 34 additions and 24 deletions

View File

@@ -8,7 +8,7 @@
Specialized processor for housenumbers. Analyses common housenumber patterns
and creates variants for them.
"""
from typing import Mapping, Any, List, cast
from typing import Any, List, cast
import re
from nominatim.tokenizer.token_analysis.generic_mutation import MutationVariantGenerator
@@ -20,7 +20,7 @@ RE_NAMED_PART = re.compile(r'[a-z]{4}')
### Configuration section
def configure(rules: Mapping[str, Any], normalization_rules: str) -> None: # pylint: disable=W0613
def configure(*_: Any) -> None:
""" All behaviour is currently hard-coded.
"""
return None