Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Postal Address Comparison

Status
Not open for further replies.

BParsons

Technical User
Jan 27, 2005
33
US
I’m looking for ideas on analyzing addresses to determine if they are the same so that I can combine groups of individuals with the same address together and assign them a single “household id”. As you can imagine with all of the variations of address data there are several possibilities for each one, such as Drive, Dr, etc which make this interesting.

I was thinking that breaking the address into parts and then comparing them might be the way to go. Such as the street number, street name, city, state, and zip then omit parts of the address such as drive, blvd, rd, etc. Basically I’d be splitting the address string on spaces. There are still problems with this though because of possible formatting differences such as multiple word street names and prefixes like North, N, etc.

If this sounds like a good method what would be a reliable way to accomplish this?

Thanks,
Brad
 
I believe that MelissaData sells address verification software. You might want to see if looking up both addresses results in the same index value being returned.

Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
Someone here has a tool on their web site that does something like this don't they? River Guy? Or John Yingling perhaps? See if you can't find a post by one of those guys and check their signature for a link to their home pages.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Mine is for comparing text and not for "closeness". However, as a Cobol programmer I did something close to this without a lot of semantic analysis by breaking the address into words using hyphens and spaces as separators then replacing all punctuation with spaces, replaing " NORTH " by " N ", " N E " by " NE ", " PLACE " by " PL " etc etc and then comapring word for word. WE have a lot of Avenues that are named after states so I had to replace MASSACHUSETTS with MASS, CONNECTICUTT with CONN etc.

- free online Compare/Diff of snippets
 
Thanks for your suggestions. I ended up writing a little algorithm to manipulate and reconstruct the address. Then used the result of that to group the like addresses together and determine a "household".
 
I'm surprised noone suggested some kind of Regular Expressions solution.

Have a great day!

j2consulting@yahoo.com
 
I guess I would say go for exact matches on the city, state and zip, then go for closeness on the address.

Parse any numbers from both addresses and see if they are the same. If not, fail it. If so, then check the words, first check if they are the same, then check for any abreviations and first letter compairs (210 N Sherman <-> 210 North Sherman). Could be a fun little program to write on its own.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
I would also suggest converting your words to soundex values before comparing. This helps to deal with typos.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top