FA-96172 / Postal address normalization / Member archive
Attention and care-of line extractor: words that start with a prefix are captured · case 02
"CARE OFFICE PARK" becomes care-of "FICE PARK".
Case contract
Input a list of lines. Each line is uppercased and whitespace-collapsed. The first line whose text starts with ATTENTION or ATTN, followed by end, space or colon, fills "attention"; likewise CARE OF or C/O fills "care_of"; the value is the remainder with leading spaces and colons removed. Every other line, including later duplicates, is kept in "lines".
Why this case matters
Recipient-routing lines must be separated from the delivery address before street and last-line parsing, or the attention name is parsed as a street.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| word that merely starts with CARE OF | {"attention": "", "care_of": "FICE PARK", "lines": ["12 FAKE RD"]} | {"attention": "", "care_of": "", "lines": ["CARE OFFICE PARK", "12 FAKE RD"]} | 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 ↗