hassansin / parse-address

US Street Address Parser
http://hassansin.github.io/parse-address/
Other
159 stars 82 forks source link

[Bug] Parses following address incorrectly "'4505 ravenwood pl union city ga" #28

Open Restuta opened 5 years ago

Restuta commented 5 years ago

Parsing of 4505 ravenwood pl union city ga results in

{
  "number": "4505",
  "street": "ravenwood pl",
  "type": "Un",
  "city": "city",
  "state": "ga"
}

while it should be

{
  "number": "4505",
  "street": "ravenwood",
  "type": "pl",
  "city": "union city",
  "state": "ga"
}

Adding , after street name helps, but it's not always possible.

PlNG commented 3 years ago

The issue is that it's parsing ltr, while the post office suggestion for parsers is rtl. It breaks on "100 West Valley Stream Blvd" returning "100 W Vly". If it was parsing RTL properly it would pick up type blvd and set it, see type Stream and type is set, so it should append it to the street name, see type Valley and type is set, so it should append it to the street name.