Skip to content

Commit

Permalink
Merge pull request #1509 from pelias/libpostal-union-square-parse
Browse files Browse the repository at this point in the history
Special case 'union square' libpostal parse
  • Loading branch information
orangejulius authored Feb 5, 2021
2 parents b65a6a0 + 9907b58 commit 7a262d0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions controller/libpostal.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ function patchBuggyResponses(response){
}
}

// union square should be venue, not neighbourhood
let suburb = _.get(idx, 'suburb');
// change suburb to house (turned into 'query' by pelias)
if (suburb && suburb.label === 'suburb' && suburb.value === 'union square') {
_.pullAt(response, suburb._pos);
response.push({ label: 'house', value: suburb.value });
}

return response;
}

Expand Down

0 comments on commit 7a262d0

Please sign in to comment.