News for hackers. Stuff that matters.

Detect/Parse Mailing Addresses in Text

Are there any open source/commercial libraries out there that can detect mailing addresses in text, just like how Apple's Mail app underlines addresses on the Mac/iPhone.

I've been doing a little online research and the ideas seem to be either to use Regex or a full on NLP package such as Stanford's NLP, which usually are pretty massive. I doubt iPhone has a 500MB NLP package in there, which makes me to believe there should be an easier way. Too bad UIDataDetectors is not open source.

Thanks,

Drew

( 2 comments | 2 points | on HN )
Re:Detect/Parse Mailing Addresses in Text by nfriedly on Wednesday February 23, 2011 @10:16PM (#2256795)
Are you only trying to detect US addresses, or anywhere in the world?

For US addresses, a quick check for known zip codes or state names/abbreviations might be a good place to start if you're looking to roll your own.

Re:Detect/Parse Mailing Addresses in Text by drew_kutchar on Thursday February 24, 2011 @01:02AM (#2257095)
Yes, US only. I prefer to use a lib/tool that already exists.