[fix] add country randomly in the formatted language training data in cases where country is not present

This commit is contained in:
Al
2015-11-25 14:54:41 -05:00
parent 1a6618957b
commit 3217fa39cd

View File

@@ -709,6 +709,8 @@ def build_address_format_training_data_limited(language_rtree, infile, out_dir):
if have_country and random.random() < 0.4:
have_country = False
elif not have_country and random.random() < 0.2:
have_country = True
if not value:
continue