mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-25 18:48:15 +00:00
move country_info into data submodule
This commit is contained in:
@@ -63,8 +63,9 @@ class SetupAll:
|
||||
|
||||
|
||||
@staticmethod
|
||||
def run(args):
|
||||
from ..tools import database_import, refresh, postcodes, freeze, country_info
|
||||
def run(args): # pylint: disable=too-many-statements
|
||||
from ..data import country_info
|
||||
from ..tools import database_import, refresh, postcodes, freeze
|
||||
from ..indexer.indexer import Indexer
|
||||
|
||||
country_info.setup_country_config(args.config)
|
||||
|
||||
@@ -11,7 +11,7 @@ format.
|
||||
import re
|
||||
|
||||
from nominatim.errors import UsageError
|
||||
from nominatim.tools import country_info
|
||||
from nominatim.data import country_info
|
||||
|
||||
class CountryPostcodeMatcher:
|
||||
""" Matches and formats a postcode according to a format definition
|
||||
|
||||
@@ -17,7 +17,7 @@ from nominatim.db.properties import set_property, get_property
|
||||
from nominatim.errors import UsageError
|
||||
from nominatim.tokenizer.place_sanitizer import PlaceSanitizer
|
||||
from nominatim.tokenizer.icu_token_analysis import ICUTokenAnalysis
|
||||
import nominatim.tools.country_info
|
||||
import nominatim.data.country_info
|
||||
|
||||
LOG = logging.getLogger()
|
||||
|
||||
@@ -46,7 +46,7 @@ class ICURuleLoader:
|
||||
config='TOKENIZER_CONFIG')
|
||||
|
||||
# Make sure country information is available to analyzers and sanitizers.
|
||||
nominatim.tools.country_info.setup_country_config(config)
|
||||
nominatim.data.country_info.setup_country_config(config)
|
||||
|
||||
self.normalization_rules = self._cfg_to_icu_rules(rules, 'normalization')
|
||||
self.transliteration_rules = self._cfg_to_icu_rules(rules, 'transliteration')
|
||||
|
||||
@@ -30,7 +30,7 @@ Arguments:
|
||||
any analyzer tagged) is retained. (default: replace)
|
||||
|
||||
"""
|
||||
from nominatim.tools import country_info
|
||||
from nominatim.data import country_info
|
||||
|
||||
class _AnalyzerByLanguage:
|
||||
""" Processor for tagging the language of names in a place.
|
||||
|
||||
Reference in New Issue
Block a user