Click here to Skip to main content
15,898,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please help:-
To check the customer address against to our SQL DB address list,to tell the address is existed in our DB or not.
The customer address comes in different format.
e.g:- 8455 W 23RD st OFFICE 4
8455 WEST 23RD st OFC 4
8455 WEST TWENTY-THIRD street OFC 4
If I do string compare,I will get bExist = False;


Note:- I am using C#,
The server were the application run has no internet connection.
Please advice.
Posted
Updated 20-Oct-13 20:21pm
v4

1 solution

You can do a frequency analysis on the characters, and/or take abbreviated values (W surrounded by spaces is WEST, ST by spaces is STREET) and expand them, etc then get a probability of how similar they are. I did this on a database project once and it worked well.

Code Example and Explanation[^]
 
Share this answer
 
v3
Comments
_Natula 13-Jun-13 19:11pm    
I like you approach. Would you provide sample code please.
Ron Beyer 13-Jun-13 19:15pm    
I updated my solution with a link to an example. Look at the first answer.
_Natula 13-Jun-13 19:59pm    
Thanks I am aware of LevenshteinDistance,I am looking for the way how to normalize the address.eg 1st to First.2nd to second.
Ron Beyer 13-Jun-13 20:05pm    
A lot of simple string.Replace(" First ", " 1ST ") type statements.
_Natula 13-Jun-13 20:21pm    
I don't want to list all possible numbers, it got to be some algorithm.thanks for ur time again.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900