Jump to content

Nab addresses from web page


Erroneous

Recommended Posts

I'm looking into building an application on my site that goes through garage sales listings from Craig's List and strips out the addresses from postings and then displays them on a google map. I know I won't be able to interpret something like "Off of A Rd and B Rd. Follow signs.", but that is OK. Anyone know of some code for finding an address from a block of text? If not I plan on looking through the listings for a number followed by some words and then followed by either a zip, punctuation mark, new line, city, or city and state and then searching for it in google maps. Not sure if someone has already developed this but I'm sure spammers have dozens of crawlers that do exactly this. Eventually if this works, I may even add in a thing to nab the date listed for the garage sale searching for day of week names and maybe using logic and spelling correctors to figure out a date out of a string of text like "firday after next".

Link to comment
Share on other sites

Check the google map API page. They also now have a public geocoder that you can use to convert addresses to lat/long coordinates. I have a form I uses that people can fill out and it enters the info into a MySql database where the map auto generates all the pushpins pulled from the DB, but my form requires them to enter the lat/long coordinates. It is possible to have google convert all the addresses for you though. I just never got around to making the geocoder for it.

Here is what I worked form for my stuff:

http://code.google.com/support/bin/answer.py?answer=65622

http://code.google.com/support/bin/answer....amp;ctx=sibling

Might help you get started.

Link to comment
Share on other sites

Check the google map API page. They also now have a public geocoder that you can use to convert addresses to lat/long coordinates.

I actually saw this when I first started using the Maps API since I had an address I wanted to convert to coordinates. The only thing I need really is kind of a smart filter for each craig's list page so that I can get the address to put into the geocoder. If it finds a match for the address(es) that the filter comes up with, I'll put the coordinates and street address into a database, along with the description, and have it show up on the page. As I said I could make my own algorithm to go through each word in the description and title, but I didn't want to reinvent the wheel, especially since the wheel that is there is probably already refined from various problems it came across.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...