Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 910675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:04:53+00:00 2026-05-15T17:04:53+00:00

I have Persons table in SQL Server 2008 . My goal is to find

  • 0

I have Persons table in SQL Server 2008.

My goal is to find Persons who have almost similar addresses.

The address is described with columns state, town, street, house, apartment, postcode and phone.

Due to some specific differences in some states (not US) and human factor (mistakes in addresses etc.), address is not filled in the same pattern.

Most common mistakes in addresses

  1. Case sensitivity
  2. Someone wrote “apt.”, another one “apartment” or “ap.” (although addresses aren’t written in English)
  3. Spaces, dots, commas
  4. Differences in writing street names, like ‘Dr. Jones str.” or “Doctor Jones street” or “D. Jon. st.” or “Dr Jones st” etc.

The main problem is that data isn’t in the same pattern, so it’s really difficult to find similar addresses.

Is there any algorithm for this kind of issue?

Thanks in advance.

UPDATE

  1. As I mentioned address is separated into different columns. Should I generate a string concatenating columns or do your steps for each column?
    I assume I shouldn’t concatenate columns, but if I’ll compare columns separately how should I organize it? Should I find similarities for each column an union them or intersect or anything else?
  2. Should I have some statistics collecting or some kind of educating algorithm?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:04:54+00:00Added an answer on May 15, 2026 at 5:04 pm

    Suggest approaching it thus:

    1. Create word-level n-grams (a trigram/4-gram might do it) from the various entries

    2. Do a many x many comparison for string comparison and cluster them by string distance. Someone suggested Levenshtein; there are better ones for this kind of task, Jaro-Winkler Distance and Smith-Waterman work better. A libraryt such as SimMetrics would make life a lot easier

    3. Once you have clusters of n-grams, you can resolve the whole string using the constituent subgrams i.e. D.Jones St => Davy Jones St. => DJones St.

    Should not be too hard, this is an all-too-common problem.

    Update: Based on your update above, here are the suggested steps

    1. Catenate your columns into a single string, perhaps create a db “view” . For example,

      create view vwAddress
      as
      select top 10000
      state town, street, house, apartment, postcode,
      state+ town+ street+ house+ apartment+ postcode as Address
      from …

    2. Write a separate application (say in Java or C#/VB.NET) and Use an algorithm like JaroWinkler to estimate the string distance for the combined address, to create a many x many comparison. and write into a separate table
      address1 | address n | similarity

    You can use Simmetrics to get the similarity thus:

     JaroWinnkler objJw = new JaroWinkler()
    double sim =  objJw.GetSimilarity (address1, addres n);
    
    1. You could also trigram it so that an address such as “1 Jones Street, Sometown, SomeCountry” becomes “1 Jones Street”, “Jones Street Sometown”, and so on….
      and compare the trigrams. (or even 4-grams) for higher accuracy.

    2. Finally you can order by similarity to get a cluster of most similar addresses and decide an approprite threshold. Not sure why you are stuck

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.