[fix] add country randomly in the formatted language training data in cases where country is not present
This commit is contained in:
@@ -709,6 +709,8 @@ def build_address_format_training_data_limited(language_rtree, infile, out_dir):
|
|||||||
|
|
||||||
if have_country and random.random() < 0.4:
|
if have_country and random.random() < 0.4:
|
||||||
have_country = False
|
have_country = False
|
||||||
|
elif not have_country and random.random() < 0.2:
|
||||||
|
have_country = True
|
||||||
|
|
||||||
if not value:
|
if not value:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user