You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
As the OpenStreetMap address data is not normalized db wide, I'm using libpostal parse_address to assign common labels.
Could you modify the ADDR_LONG_TEXT
to start with ISO country code or move the postcode to the end of the string, so libpostal would understand the postcode?
Here's an example how libpostal handles address data without and with the country code, and with the postcode in the end of the address
>>> from postal.parser import parse_address
>>> parse_address('SG19 3EP, 19-21, Church End, Gamlingay CP (S Cambs), South Cambridgeshire, Cambridgeshire')
[(u'sg19 3ep', u'suburb'), (u'19-21', u'house_number'), (u'church end', u'road'), (u'gamlingay cp s cambs', u'city'), (u'south cambridgeshire cambridgeshire', u'state_district')]
>>> parse_address('UK SG19 3EP, 19-21, Church End, Gamlingay CP (S Cambs), South Cambridgeshire, Cambridgeshire')
[(u'uk', u'country'), (u'sg19 3ep', u'postcode'), (u'19-21', u'house_number'), (u'church end', u'road'), (u'gamlingay cp s cambs', u'city'), (u'south cambridgeshire cambridgeshire', u'state_district')]
>>> parse_address('19-21, Church End, Gamlingay CP (S Cambs), South Cambridgeshire, Cambridgeshire, SG19 3EP')
[(u'19-21', u'house_number'), (u'church end', u'road'), (u'gamlingay cp s cambs', u'city'), (u'south cambridgeshire cambridgeshire', u'state_district'), (u'sg19 3ep', u'postcode')]
The text was updated successfully, but these errors were encountered:
Hi,
As the OpenStreetMap address data is not normalized db wide, I'm using libpostal parse_address to assign common labels.
Could you modify the
ADDR_LONG_TEXT
to start with ISO country code or move the postcode to the end of the string, so libpostal would understand the postcode?
Here's an example how libpostal handles address data without and with the country code, and with the postcode in the end of the address
The text was updated successfully, but these errors were encountered: