From 6d20d7348f67ebbf2359217869a3ea2d64a71d8e Mon Sep 17 00:00:00 2001 From: Al Date: Mon, 23 Nov 2015 14:42:23 -0500 Subject: [PATCH] [osm] Using OSM namespaced tags from polygons in the case of non-local languages --- scripts/geodata/osm/osm_address_training_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/geodata/osm/osm_address_training_data.py b/scripts/geodata/osm/osm_address_training_data.py index 97721182..7144224c 100644 --- a/scripts/geodata/osm/osm_address_training_data.py +++ b/scripts/geodata/osm/osm_address_training_data.py @@ -579,7 +579,7 @@ def build_address_format_training_data(admin_rtree, language_rtree, neighborhood seen.add((component, name)) for component, vals in poly_components.iteritems(): - if component not in address_components: + if component not in address_components or non_local_language: val = u', '.join(vals) if component == AddressFormatter.STATE and random.random() < 0.7: val = STATE_EXPANSIONS.get(address_country, {}).get(val, val)