feat(tn/en/address): US street address tagger (1→8) - #64
Merged
Merged
Conversation
Add an `address` tagger (sentence-mode priority 89) for street addresses:
- "1428 Elm St" → "fourteen twenty eight Elm Street"
- "708 N 1st St, San City" → "seven zero eight North first Street, San City"
- "2788 San Tomas Expy, Santa Clara, CA 95051"
→ "twenty seven eighty eight San Tomas Expressway, Santa Clara,
California nine five zero five one"
A leading house number reads year-style (with "zero" for a mid "oh"), an
optional directional (N/S/E/W) and street words follow, then a recognized
street suffix, optionally with comma-separated city/state/ZIP. Requires a
suffix and rejects trailing punctuation so it does not over-run into the
sentence.
en TN address 1→8; measure 10→11 as a side win. The three unreached cases are
NeMo's irregular ones (a false-positive "1990 for the Ata ST", "Main St."
without a house number, and NeMo's own "(incorrect normalization)" example).
No regressions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds an
addresstagger (sentence-mode priority 89) for US street addresses:1428 Elm St→ "fourteen twenty eight Elm Street"708 N 1st St, San City→ "seven zero eight North first Street, San City"2788 San Tomas Expy, Santa Clara, CA 95051→ "twenty seven eighty eight San Tomas Expressway, Santa Clara, California nine five zero five one"A leading house number reads year-style (with "zero" for a mid "oh"); an optional directional (N/S/E/W) and street words follow, then a recognized street suffix, optionally with comma-separated city / state / ZIP (state codes and 5-digit ZIPs expand). Requires a suffix and rejects trailing punctuation so it does not over-run into the surrounding sentence.
en TN address: 1/11 → 8/11; measure 10→11 as a side win. No regressions.
The three unreached cases are NeMo's irregular ones: a false-positive (
1990 for the Ata ST— not really a street),Main St.(no house number), and NeMo's own(incorrect normalization)example. Documented in the module header.cargo test/fmt/clippy green; baseline regenerated (only increases).🤖 Generated with Claude Code