Make suggestions based off of person's name

568 Views Asked by At

So I've searched fuzzy searching, the Levenshtein Distance Algorithm and I'm not sure if either are a true fit for what I'm doing. Please let me know your thoughts, if any...

How can I take a user's full name, and generate a list of similar names? I want to prevent a user from creating multiple accounts in an application by providing a "Hey are you sure none of these are you" as a final step before account creation.

I've found this article, but it's entirely SQL-based (http://stackoverflow.com/questions/988050/matching-records-based-on-person-name)

I'm using c# / Linq, SqlServer.

Thanks for your time!

2

There are 2 best solutions below

0
On

Here is a link to a SOUNDEX implementation in .NET:

http://www.codeproject.com/KB/recipes/soundex.aspx

I haven't used it but it seems to be rated well

0
On

If it were me, I would require an exact match on the last name, and then only try to guess variances of the first name. This would narrow down your field of work quite a bit.

Then, as you suggested in your comments, you could apply rules of +/- a few characters of the first name length as well as a threshold of say (80%) of the characters must match.

Also, you can then only look at first names that also match the first X characters as well, as most English name deviations will be after X number of characters.

Example:

  • John Doe
  • Johnny Doe
  • Johnathan Doe