tags:

views:

441

answers:

3

I'm looking for a good address-parser that could parser any free texts and generate a tokenized output:

If you have something in C# would be helpful, but has no problem if in another language.


Example 1:

Free text entry: 23 Street n. 213 new york ny

Output: Street: 23 Street, Number: 213, City: New York, State: NY


Example 2:

Free text entry: new york

Output: City: New York


Example 3:

Free text entry: 12345

Output: ZIP: 12345


Example 4:

Free text entry: Auckley Fake Street New York New York

Output: Street: Auckley Fake Street, City: New York, State: New York

+1  A: 

Here is a Perl solution that seems to address your address problem:

http://cpan.uwinnipeg.ca/htdocs/Geo-StreetAddress-US/Geo/StreetAddress/US.pm.html

And here is JGeoCoder, a Java solution :

http://docs.codehaus.org/display/JGEOCODER/Parser

mandaleeka
+1  A: 

If you're willing to take advantage of remote services, you can try Google's Geocoding API. I think it provides the detail you require while accepting free form input.

Edit: Sorry, I didn't catch the essence of your question. The Geocoding API cannot specifically identify what was typed in (for example, whether it was a ZIP code, an address, etc...)

Adam Paynter
A: 

hey andy...i think your code is one of the best i have seen yet but which languagae have you used to write it?

pranit saindani