Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address does not parse correctly #366

Open
soapergem opened this issue May 24, 2024 · 0 comments
Open

Address does not parse correctly #366

soapergem opened this issue May 24, 2024 · 0 comments

Comments

@soapergem
Copy link

Here's an example of a valid US address which is not parsed correctly by this package:

import json
import usaddress

parsed = usaddress.parse("1509 Via Christina, Vista, CA 92084")
components = {x[1]: x[0] for x in parsed}
print(json.dumps(components, indent=2))

What happens here is that usaddress misinterprets "Vista" as the StreetNamePostType instead of the PlaceName, so we end up with this:

{
  "AddressNumber": "1509",
  "StreetNamePreType": "Via",
  "StreetName": "Christina,",
  "StreetNamePostType": "Vista,",
  "StateName": "CA",
  "ZipCode": "92084"
}

I would obviously expect it to handle addresses like this correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant