[fix] making a separate gazetteer for toponym abbreviations

This commit is contained in:
Al
2016-09-10 01:08:58 -04:00
parent bcde9e2fe7
commit 551cce8cb1
3 changed files with 12 additions and 9 deletions

View File

@@ -774,7 +774,7 @@ class AddressComponents(object):
if component == AddressFormatter.STATE and random.random() < abbreviate_state_prob:
val = state_abbreviations.get_abbreviation(country, language, val, default=val)
elif random.random() < abbreviate_toponym_prob:
val = abbreviate(toponym_gazetteer, val, language, abbreviate_prob=abbreviate_toponym_prob)
val = abbreviate(toponym_abbreviations_gazetteer, val, language, abbreviate_prob=abbreviate_toponym_prob)
address_components[component] = val