[fix] Making country replacement probability independent of the probability used for local vs non-local languages
This commit is contained in:
@@ -447,11 +447,12 @@ def build_address_format_training_data(admin_rtree, language_rtree, neighborhood
|
|||||||
|
|
||||||
non_local_language = None
|
non_local_language = None
|
||||||
|
|
||||||
r = random.random()
|
if random.random() < 0.3:
|
||||||
if r < 0.2:
|
# 30% of the time: add Quattroshapes country
|
||||||
# 20% of the time: add Quattroshapes country
|
|
||||||
address_country = country.upper()
|
address_country = country.upper()
|
||||||
|
|
||||||
|
r = random.random()
|
||||||
|
|
||||||
# 1. 60% of the time: use the country name in the current language or the country's local language
|
# 1. 60% of the time: use the country name in the current language or the country's local language
|
||||||
if address_country and r < 0.6:
|
if address_country and r < 0.6:
|
||||||
localized = None
|
localized = None
|
||||||
|
|||||||
Reference in New Issue
Block a user