string comparison?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

anonymous_at_discussions.microsoft.com
Date: 07/10/04


Date: Sat, 10 Jul 2004 08:30:54 -0700

If I had to do this I would do the following:

1. Check for only the Alphanumeric Values (A-Z,0-9)
2. Remove the common words: Street, Avenue, Drive and the
common abbreviations for these words.... etc from both
strings
3. Compare the remaining letters in both strings,
removing those letters that match from both strings as
you go.(Do NOT check position of letter, but remove it
irrespective of where it is in the string
using "Replace").
4.If you have a perfect match, both strings will be equal
to "" otherwise you will have to decide what tolerance
you are prepared to accept based purely on the length of
the remaining strings.

I'm sure you could come up with some additional
refinements to the above...

Good Luck
>-----Original Message-----
>Hello all...
>
>I am trying to see if the House Number, Street Name, and
Street Type of two
>addresses to see if they are the *same*. Only thing is
that these fields
>are not broken out into seperate fields, they are all
contained in an
>Address1 field for each address.
>
>My question is, does anyone have any good string
comparison algorithms or
>recommendations for how to compare the two street names
such that items that
>are so close but off by a few characters would still be
considered the same?
>
>For example:
>
>First Address = "1190 N Main Street"
>Second Address = "1190 MAIN ST"
>
>I am thinking something along the lines of splitting the
address out into
>parts using Split(), but this may not help in situations
where the street
>name contains multiple words such as 100 "Rising Sun
Avenue".
>
>If you have any recommendations, comments, or
suggestions, please let me
>know.
>
>Thanks!!!
>
>Brian
>
>
>.
>



Relevant Pages

  • Re: Lost in loops
    ... >> I am really stuck with my program that will compare two strings and ... >> assign scores between pairs of letters. ... >> is now in a 2D char array ...
    (comp.lang.java.programmer)
  • Re: Lost in loops
    ... > a second file formatted as so... ... You don't say what you mean by "compare two strings", ... Refine this using powers of 2 if there are more than 10 different letters. ...
    (comp.lang.java.programmer)
  • Re: Lost in loops
    ... > I am really stuck with my program that will compare two strings and ... > assign scores between pairs of letters. ... > is now in a 2D char array ...
    (comp.lang.java.programmer)
  • Re: A note on computing thugs and coding bums
    ... Here's my response including a bug fix. ... to make "modern strings" possible was designed and first implemented ... contents to strings, to compare them, and to duplicate them. ... while the Pike code will NEVER work...for international strings. ...
    (comp.programming)
  • Re: Ascan with a Substr
    ... the above suggestion: ... operator to compare the strings. ... code block you originally used was just right, ...
    (comp.lang.clipper)