libpostal icon indicating copy to clipboard operation
libpostal copied to clipboard

Libpostal fails to parse a UK address

Open yogeshrao opened this issue 4 years ago • 2 comments

Hi!

I was checking out libpostal, and saw something that could be improved.


My country is

India


Here's how I'm using libpostal

Trying it out as a address parser instead of Regex


Here's what I did

Using Pypostal parsed address "The Vineyard Warehouse,Newbury Road,Andover,Hampshire,SP10 4EU,GB"


Here's what I got

Response : [('the vineyard warehouse', 'house'), ('newbury road', 'road'), ('andover', 'city'), ('hampshire', 'state_district'), ('sp10', 'postcode'), ('4eu', 'city'), ('gb', 'country')]


Here's what I was expecting

Correct Response : [('the vineyard warehouse', 'house'), ('newbury road', 'road'), ('andover', 'city'), ('hampshire', 'state_district'), ('sp10 4eu', 'postcode'), ('gb', 'country')]

4eu (part of postcode is considered as city even when parser has parsed andover as city)

Regards, -Yogesh

yogeshrao avatar Sep 02 '20 13:09 yogeshrao

Hi, Ive had similar issues with libpostal. I would suggest replacing GB with United Kingdom. that helped for me,

philhutch50 avatar Sep 15 '20 09:09 philhutch50

Check this issue a while ago.

lenniebriscoe avatar Sep 20 '20 22:09 lenniebriscoe