Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat neighbourhood as city when no city was parsed by libpostal #830

Open
trescube opened this issue Mar 29, 2017 · 1 comment
Open

Treat neighbourhood as city when no city was parsed by libpostal #830

trescube opened this issue Mar 29, 2017 · 1 comment
Assignees
Labels

Comments

@trescube
Copy link
Contributor

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.

@trescube trescube added this to the API Improvements milestone Mar 29, 2017
@dianashk
Copy link
Contributor

Fixed! Let's add acceptance tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants