Skip to content

fix(cbcity_nsw_gov_au): match the address on a normalised form - #7304

Open
CRZTFR wants to merge 1 commit into
mampfes:masterfrom
CRZTFR:fix/cbcity-normalised-match
Open

fix(cbcity_nsw_gov_au): match the address on a normalised form#7304
CRZTFR wants to merge 1 commit into
mampfes:masterfrom
CRZTFR:fix/cbcity-normalised-match

Conversation

@CRZTFR

@CRZTFR CRZTFR commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

fullAddress is held as 102 Crinan Street, Hurlstone Park 2193: comma before the suburb, street type spelled out, postcode but no state. Matching against that string verbatim (or as a substring of it) meant three of the most ordinary things a person types found nothing at all:

"102 Crinan Street Hurlstone Park 2193"       no comma            -> no match
"102 Crinan Street, Hurlstone Park NSW 2193"  added state         -> no match
"102 Crinan St Hurlstone Park"                abbreviated type    -> no match

The whole street list is already downloaded, so both sides can simply be compared on a normalised form: upper case, commas and unit slashes dropped, street-type abbreviations expanded, state removed.

The verbatim check is kept ahead of it, and the partial-match and suggestion behaviour is unchanged apart from running on the normalised text too.

Testing

All nine existing test cases still pass, plus three new ones for the shapes above, against the live data file.

fullAddress is held as "102 Crinan Street, Hurlstone Park 2193": comma
before the suburb, street type spelled out, postcode but no state. Matching
against that string verbatim (or as a substring of it) meant three of the
most ordinary things a person types found nothing at all:

    "102 Crinan Street Hurlstone Park 2193"       no comma
    "102 Crinan Street, Hurlstone Park NSW 2193"  added state
    "102 Crinan St Hurlstone Park"                abbreviated street type

The whole street list is already downloaded, so both sides can simply be
compared on a normalised form: upper case, commas and unit slashes dropped,
street-type abbreviations expanded, state removed. The verbatim check is
kept ahead of it, and the partial-match and suggestion behaviour is
unchanged apart from running on the normalised text too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants