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

Parse addresses with 'County Road xx' names #251

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rptetzloff
Copy link

Training for multi-letter County Road names, e.g. "County Road XX."

"County Road D" was parsing correctly:

>>> address1 = usaddress.tag("1234 COUNTY ROAD D, FRANKLIN, WI 54567")
>>> pprint(address1)
(OrderedDict([('AddressNumber', '1234'),
              ('StreetNamePreType', 'COUNTY ROAD'),
              ('StreetName', 'D'),
              ('PlaceName', 'FRANKLIN'),
              ('StateName', 'WI'),
              ('ZipCode', '54567')]),
 'Street Address')

"County Road DD" was not parsing correctly:

>>> address2 = usaddress.tag("1234 COUNTY ROAD DD, FRANKLIN, WI 54567")
>>> pprint(address2)
(OrderedDict([('AddressNumber', '1234'),
              ('StreetName', 'COUNTY ROAD'),
              ('StreetNamePostType', 'DD'),
              ('PlaceName', 'FRANKLIN'),
              ('StateName', 'WI'),
              ('ZipCode', '54567')]),
 'Street Address')

Training xml located at:

usaddress/training/county_road_xx.xml

Testing xml located at:

usaddress/measure_performance/test_data/county_road_xx.xml

Each contained 6 addresses.

All tests passed.

> nosetests . 
<snip>
----------------------------------------------------------------------
Ran 4929 tests in 1.329s

OK

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

Successfully merging this pull request may close these issues.

1 participant