FA-95858 / Postal address normalization / Member archive
Street line standardizer: suffix is peeled before the post-directional · case 03
"OAK ROAD SOUTH" normalizes to "OAK ROAD S" and the suffix stays unabbreviated.
Case contract
Input one street line of synthetic text. Uppercase it, delete periods, turn commas into spaces and split on whitespace. The first token is the house number. From the remaining body, in this order: a trailing directional becomes the post-directional only if at least two body tokens exist; then a trailing suffix from the table is abbreviated only if at least two body tokens remain; then a leading directional becomes the pre-directional only if at least one name token would remain. Return number, pre, name, suffix, post joined by single spaces.
Why this case matters
Street lines are the dominant key in address matching; a single-token street named after a direction or suffix must not be abbreviated away.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| suffix followed by post-directional | "121 MAPLE ROAD S" | "121 MAPLE RD S" | 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 ↗