pelias / pelias/api

Treat neighbourhood as `city` when no city was parsed by libpostal

Open
#830 1 comment 0 reactions 1 assignee View on GitHub

@trescube is already working on this.

Since Jul 27, 2017.

on-deck
Dominant language
JavaScript
Stars
259
Forks
168
Avg merge
6h 15m
Merged PRs (30d)
1

Description

libpostal parses 100 Lancaster Dr Ne, Four Corners, OR, USA as:

> 100 Lancaster Dr Ne, Four Corners, OR, USA

Result:

{
  "house_number": "100",
  "road": "lancaster dr ne",
  "suburb": "four corners",
  "state": "or",
  "country": "usa"
}

The correct interpretation is that Four Corners should have been identified as a city instead of a neighbourhood.

Add logic to query ES with neighbourhood as city if no city was identified. This shouldn't happen at the parse layer because the neighbourhood may actually be intentional, for example:

> 30 w 26th st flatiron district

Result:

{
  "house_number": "30",
  "road": "w 26th st",
  "suburb": "flatiron district"
}

This logic should happen in the ES query logic so "Four Corners" would be queried for at the neighbourhood, locality, and localadmin layers.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.