Skip to content

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

@xmedr
Copy link
Contributor

xmedr commented May 1, 2025

Thanks for this great work @rptetzloff! I'm pulling this training/testing data into #390 mostly because of the new testing suite that was added to this repo. So I'll be closing this pr.

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.

2 participants