Fix addresses with a dirty ordinal indicator. #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi! Over at CrowdFiber we have a lot of parcel data with addresses and
frequently encounter cases like
1 1 ST St, e San Jose CA
. We expect the parser to produce an address like1 1st St, East San Jose, CA
but without this fix1 1 St St, East San Jose, CA
is what we get.We could fix this in post processing, but it makes more sense to take this case into account inside
StreetAddress::US
since we encounter it so often.I've added test cases based on addresses in
StreetAddress::US
test suite and modified to match the issue we're encountering. My changes pass the test suite and we have been using this code in production.