X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8171fe4571a57bf8e5b2a8f676989e973897e2e7..7cfcbacfc75ab2e39ee7eab6a5cf40e8cbd152f5:/test/python/test_tokenizer_icu.py diff --git a/test/python/test_tokenizer_icu.py b/test/python/test_tokenizer_icu.py index 9a6f5a94..52cca6a7 100644 --- a/test/python/test_tokenizer_icu.py +++ b/test/python/test_tokenizer_icu.py @@ -69,10 +69,11 @@ def analyzer(tokenizer_factory, test_config, monkeypatch, def _mk_analyser(norm=("[[:Punctuation:][:Space:]]+ > ' '",), trans=(':: upper()',), variants=('~gasse -> gasse', 'street => st', ), sanitizers=[]): - cfgstr = {'normalization' : list(norm), - 'sanitizers' : sanitizers, - 'transliteration' : list(trans), - 'variants' : [ {'words': list(variants)}]} + cfgstr = {'normalization': list(norm), + 'sanitizers': sanitizers, + 'transliteration': list(trans), + 'token-analysis': [{'analyzer': 'generic', + 'variants': [{'words': list(variants)}]}]} (test_config.project_dir / 'icu_tokenizer.yaml').write_text(yaml.dump(cfgstr)) tok.loader = ICURuleLoader(test_config)