bcgov / ols-geocoder

Physical Address Geocoder
Apache License 2.0
10 stars 6 forks source link

Locality appearing before street address is treated as initial garbage #216

Closed bstratto closed 6 months ago

bstratto commented 3 years ago

When an addressString shows the locality first, then the street address, Geocoder 4.1 treats the locality as initial garbage and reports faults [INITIAL_GARBAGE.notAllowed:3, LOCALITY.missing:10]. This takes the score for the address below 90 even though the content of the address is clean, just out of order.

This issue is found in 173 addresses in the entire HLTH HealthIdeas file.

Examples:

addressString Geocoder standardized address Score
PRINCE GEORGE BC, 7364 HART HIWAY, BC 7364 Hart Hwy, Prince George, BC 87
VANCOUVER BC, 1333 WEST BROADWAY, BC 1333 W Broadway, Vancouver, BC 87
ABBOTSFORD BC, 104 32910 AMICUS PLACE, BC UNIT 104 -- 32910 Amicus Pl, Abbotsford, BC 87
UCLUELET BC, 947 AMPHITRITE PLACE, BC 947 Amphitrite Pl, Ucluelet, BC 87
CHILLIWACK BC, 47553 SWALLOW CR, BC 47553 Swallow Cres, Chilliwack, BC 87
mraross commented 3 years ago

If you put two copies of the address into addressString, you get a good match. For example:

 PRINCE GEORGE BC, 7364 HART HIWAY, BC PRINCE GEORGE BC, 7364 HART HIWAY, BC

returns a score of 92. Try this:

https://geocoder.api.gov.bc.ca/addresses.xhtml?brief=true&maxResults=5&addressString=PRINCE%20GEORGE%20BC,%207364%20HART%20HIWAY,%20BC%20PRINCE%20GEORGE%20BC,%207364%20HART%20HIWAY,%20BC

alixcote commented 6 months ago

Closing - adding to AI sample documentation.