[osm] abbreviate toponyms (qualifiers) with some probability so we get those versions in the model's phrase dictionaries
This commit is contained in:
@@ -142,7 +142,6 @@ NAME_DICTIONARIES = (GIVEN_NAME_DICTIONARY,
|
||||
SURNAME_DICTIONARY,)
|
||||
|
||||
|
||||
|
||||
NAME_ABBREVIATION_DICTIONARIES = STREET_TYPES_DICTIONARIES + ('academic_degrees',
|
||||
'building_types',
|
||||
'company_types',
|
||||
@@ -152,6 +151,8 @@ NAME_ABBREVIATION_DICTIONARIES = STREET_TYPES_DICTIONARIES + ('academic_degrees'
|
||||
'toponyms',
|
||||
)
|
||||
|
||||
QUALIFIERS_DICTIONARY = 'qualifiers'
|
||||
|
||||
HOUSE_NUMBER_DICTIONARIES = ('house_number', 'no_number')
|
||||
|
||||
POSTCODE_DICTIONARIES = ('postcode',)
|
||||
@@ -184,6 +185,7 @@ def create_gazetteer(*dictionaries):
|
||||
|
||||
|
||||
street_types_gazetteer = create_gazetteer(*STREET_TYPES_DICTIONARIES)
|
||||
qualifiers_gazetteer = create_gazetteer(QUALIFIERS_DICTIONARY)
|
||||
names_gazetteer = create_gazetteer(*NAME_ABBREVIATION_DICTIONARIES)
|
||||
chains_gazetteer = create_gazetteer(CHAIN_DICTIONARY)
|
||||
unit_types_gazetteer = create_gazetteer(*UNIT_ABBREVIATION_DICTIONARIES)
|
||||
|
||||
Reference in New Issue
Block a user