mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-12 05:44:06 +00:00
move amenity creation to tokenizer
The BDD tests still use the old-style amenity creation scripts because we don't have simple means to import a hand-crafted test file of special phrases right now.
This commit is contained in:
@@ -22,10 +22,13 @@ class ImportSpecialPhrases:
|
||||
|
||||
@staticmethod
|
||||
def run(args):
|
||||
from ..tokenizer import factory as tokenizer_factory
|
||||
|
||||
if args.import_from_wiki:
|
||||
LOG.warning('Special phrases importation starting')
|
||||
tokenizer = tokenizer_factory.get_tokenizer_for_db(args.config)
|
||||
with connect(args.config.get_libpq_dsn()) as db_connection:
|
||||
SpecialPhrasesImporter(
|
||||
args.config, args.phplib_dir, db_connection
|
||||
).import_from_wiki()
|
||||
).import_from_wiki(tokenizer)
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user