FA-96137 / Postal address normalization / Member archive
Ordinal street name normalizer: only TH-suffixed numerals are corrected · case 02
"2ST" is left as typed instead of "2ND".
Case contract
Uppercase, turn hyphens into spaces and split. A tens word (TWENTY, THIRTY, FORTY) immediately followed by a unit ordinal (FIRST..NINTH) forms one number; unit ordinals and TENTH..THIRTEENTH stand alone; digit tokens ending in ST/ND/RD/TH are re-suffixed. Each number is written with the suffix TH for values ending 11-13 (mod 100), else ST/ND/RD for final digits 1/2/3, else TH. Other tokens pass through.
Why this case matters
"Twenty-First Ave" and "21st Ave" must produce the same key or two addresses for one building never match.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| numeric ordinal with wrong suffix | "2ST ST" | "2ND ST" | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗