[openaddresses] cleaning comma-delimited boundary components in OpenAddresses data sets

This commit is contained in:
Al
2016-08-24 15:06:04 -04:00
parent 14bc224f25
commit a6dad74a2b

View File

@@ -157,6 +157,9 @@ class OpenAddressesFormatter(object):
if validator is not None and not validator(value): if validator is not None and not validator(value):
continue continue
if key in AddressFormatter.BOUNDARY_COMPONENTS:
value = self.components.cleaned_name(value, first_comma_delimited_phrase=True)
components[key] = value.strip(', ') components[key] = value.strip(', ')
if components: if components: