cityofcapetown / cape-of-good-place-names

Geospatial utility service developed as a shared iniative between the Western Cape Provincial Government and the City of Cape Town
MIT License
0 stars 1 forks source link

PhdcScrubber replaces Road with suburb name if not comma separated #16

Open ColinAnthony opened 4 years ago

ColinAnthony commented 4 years ago

Road name is replaced with suburb name, unless there is a comma after the suburb for some cases where there are multiple matches to the road name:

This is not completely consistent as main road claremont western cape results in the error, but not main road observatory western cape

Error example:

Peak rd vredehoek western cape or Peak rd, vredehoek western cape gives

{
  "id": "fddc25ba-a9d2-47c5-b36c-1dc1de370b7f",
  "results": [
    {
      "confidence": 1,
      "scrubbed_value": "Peak rd vredehoek western cape, South Africa",
      "scrubber_id": "BasicScrubber"
    },
    {
      "confidence": 0.6,
      "scrubbed_value": "VREDEHOEK RD VREDEHOEK CAPE TOWN",
      "scrubber_id": "PhdcScrubber"
    }
  ],
  "timestamp": "2020-09-30T14:23:24.629922+02:00"
}

while

Peak rd, vredehoek, western cape or Peak rd vredehoek, western cape gives

{
  "id": "b4c21817-0655-47c4-a28d-1cd5a383b63e",
  "results": [
    {
      "confidence": 1,
      "scrubbed_value": "Peak rd, vredehoek, western cape, South Africa",
      "scrubber_id": "BasicScrubber"
    },
    {
      "confidence": 0,
      "scrubbed_value": "PEAK RD, VREDEHOEK, WESTERN CAPE",
      "scrubber_id": "PhdcScrubber"
    }
  ],
  "timestamp": "2020-09-30T14:24:37.283570+02:00"
}