wit icon indicating copy to clipboard operation
wit copied to clipboard

Question: What is the correct way to classify postal code? wit/location?

Open gregs007 opened this issue 8 years ago • 1 comments

I've been trying to get wit/location to classify US postal codes (zip code). It seems that no matter how many examples I give it, it will never see just the number as a location entity.

It's for very simple weather app-- i.e. weather in 10001

If I append the zipcode to the end of an address-- like 1 Penn Plaza, New York, NY 10001 it will include the zip as part of the location, however the zip on it's own never gets recognized.

Anyone else try this or have a strategy for dealing with it?

gregs007 avatar Jan 30 '18 15:01 gregs007

Hi @gregs007,

I think wit/number would be best here, but you'd need a resolver to filter out numerals that are not US postal codes (e.g. using a database). It seems like a simple regex + resolver could work: /[0-9]{5}(-[0-9]{4})?/ (untested).

patapizza avatar Jan 31 '18 22:01 patapizza