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

Problem with address_constants.yaml #36

Open
nickpalmer2012 opened this issue Feb 16, 2024 · 0 comments
Open

Problem with address_constants.yaml #36

nickpalmer2012 opened this issue Feb 16, 2024 · 0 comments

Comments

@nickpalmer2012
Copy link

First of all, this library has been a godsend for a project I am working on at work.

I am having issues trying to set up an address_constants.yaml file to handle special cases I am running into.

I am running into special cases where the normalize_address_record(longhand=True) method returns a KeyError.

This is one such case:
Address to be normalized: 3700 US Highway 51, La Place, LA 70068
Result from normalize_address_record(longhand=True): KeyError: 'US HIGHWAY'**
**see full error message in attached .txt file
key_error.txt

This is how my address_constants.yaml file looks right now:

insertion_method: update

STREET_TYPE_ABBREVIATIONS:
    'US Highway ': 'US-'

I just want the address_line_1 to show up as 3700 US-51

What am I doing wrong to handle this special case?

I am working in a jupyter notebook right now. I set the environment variable according to the readme. I used magic commands to set the ADDRESS_CONFIG_DIR environment variable with the magic command %env method. I can confirm that the variable with the file path successfully appear when I print the environment variables within the jupyter notebook.

For context, my project involves comparing street addresses for client facilities scraped from a webpage and comparing that address to the street address that we have on file. I was running into an issue where, for example Your library's longhand method fixes problem where addresses were being flagged when the only difference was street abbreviations.

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