> I have an issue with users doing a lookup on street address. [snip] > This seems like asuch a common problem; are there any > libraries for this; what is the "correct" way to handle this? > How do google; Mapquest and Yahoo do this? (I don't have quite > their resources; but it would point me in the right > direction...)
One common Python solution is to snag PyParsing and extend their streetAddressParser.py example http://pyparsing.wikispaces.com/Examples There are some holes in it (most notably "rd" missing from the numberSuffix definition, but the cardinal directions may need expansion too from just "N S E W" to include "NW SW NE SW"), but it should get you pointed in the right direction and be fairly easily extensible. I've tried with regexps, and it gets *really ugly*. An alternative might be using the USPS website (or ERSI, Google, or Yahoo's website(s)) to do the work for you, but that may not scale well and might violate their ToS. -tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---