libpostal
libpostal copied to clipboard
Libpostal fails to parse a UK address
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
Hi, Ive had similar issues with libpostal. I would suggest replacing GB with United Kingdom. that helped for me,
Check this issue a while ago.