It seems that libpostal gets confused with airports, returning the label suburb:
curl --get http://localhost:4400/parse \
--data-urlencode 'address=john f kennedy international airport'
[{"label":"suburb","value":"john f kennedy international airport"}]
However it returns the correct label for a neighbourhood:
I think the best course of action here is to check for any parse containing a single label of type "suburb" and then discarding it.
While this certainly will discard some valid neighbourhood parses, they should be adequately handled by the fallback parsing.
It seems that
libpostal
gets confused with airports, returning the labelsuburb
:However it returns the correct label for a
neighbourhood
:And also in the case where the text refers to either an airport or a neighbourhood:
I think the best course of action here is to check for any parse containing a single label of type "suburb" and then discarding it. While this certainly will discard some valid neighbourhood parses, they should be adequately handled by the fallback parsing.