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 formatter fails with apartments #20

Open
matthewtylerwood opened this issue Nov 1, 2019 · 2 comments
Open

Address formatter fails with apartments #20

matthewtylerwood opened this issue Nov 1, 2019 · 2 comments

Comments

@matthewtylerwood
Copy link

I have a sample address:
111 East Hampton Street Apartment Z507

that once parsed, I would expect to be:
111 E Hampton St Apt Z507

However, the StreetAddressFormatter does not change the address at all. Here is my code:

from streetaddress import StreetAddressFormatter

street = '111 East Hampton Street Apartment Z507'

add_fmtter = StreetAddressFormatter()

street = add_fmtter.append_TH_to_street(street)
street = add_fmtter.abbrev_direction(street)
street = add_fmtter.abbrev_street_avenue_etc(street)

print(street)

This incorrectly gives: 111 East Hampton Street Apartment Z507

@mkurtipek
Copy link

This returns correct
(OrderedDict([('AddressNumber', '111'), ('StreetNamePreDirectional', 'East'), ('StreetName', 'Hampton'), ('StreetNamePostType', 'Street'), ('OccupancyType', 'Apartment'), ('OccupancyIdentifier', 'Z507')]), 'Street Address')

@matthewtylerwood
Copy link
Author

Hi @mkurtipek, I posted this issue over 2 years ago so it's possible the library was updated with a fix. I no longer use the library, so you can close this issue if needed.

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

2 participants