Ask HN: What's a good US address parsing library?
I'm looking to parse address strings (user input) into address objects for use across multiple services. What's a good library to do this?
I'm currently using Google Geocoding API, but since I don't use these addresses within a Google Map, I'm pretty sure I'm violating the TOS and would like to yank and replace it before I get shut down.
(
13 comments
| 19 points
| on HN
)
libpostal had the best results and good abbreviation parsing ("St" for street, "blvd" for Boulevard, etc). We use this to check if two address strings are equal, so you can imagine how much abbreviations are important to us. The US postal department website has a list of postal abbreviations but writing our own address parser with this is not a simple task.
libpostal is a few gigs of download and will take about 2gb ram to setup. But worth it.
https://github.com/openvenues/libpostal
https://developers.google.com/maps/documentation/geocoding/p...
The best options are commercial: ArcGIS, HERE, Google Maps, SmartyStreets, etc. There are free options such as OpenStreetMap, Census TIGER, and Open Addresses but in my experience the results are unreliable.
If you want something cheap, business-friendly and ready to go asap, I would advise you to use Here Maps. They have batch-geocoding plans that are quite affordable.
If you want an API that runs behind the firewall or some customization on parsing & geocoding, then we can help you with that.