Further reading resources
(forgot these in the article - sorry!):
Daitch-Mokotoff Soundex: http://www.avotaynu.com/soundex.html
Double Metaphone: http://www.ddj.com/184401251?pgno=2
Celko Improved Soundex: http://books.elsevier.com/bookscat/links/details.asp?isbn=1558605762
Levenshtein Edit Distance: http://www.dcs.shef.ac.uk/~sam/stringmetrics.html#Levenshtein
Also a minor correction to the text of the article.
The article states that the Daitch-Mokotoff algorithm returns:
"...all-numeric values between 100000 and 999999"
This should read:
"...all-numeric values between 000000 and 999999"
Thank you very much for sharing these functions with us. We have a SQL 2005 Server where the Levenshtein Edit Distance function may be useful. What are the chances for this? Is it possible to purchase the source code, so that we can upgrade it?
Henrik Staun Poulsen
I sent you a message here on SSC. If I didn't answer your questions fully, feel free to contact me directly via email.
FYI to Everyone:
Steve has made the source code (VC++ 7.1 solution) for this project available in a ZIP file from http://www.sqlservercentral.com/products/mcoles/default.asp.
Compilation of some parts requires Boost Library source (in particular the Regular Expression extended procedures require Boost). Boost source is available for free download at http://www.boost.org/.
If you do download and compile the source, I highly recommend downloading the latest Platform SDK from http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en.
I've also been asked several times about the license for this toolkit. Here it is:
DBA Toolkit License
The DBA Toolkit is composed of my original source code, and/or other source code that the original authors have placed in the public domain. Credit has been given throughout the source code to those original authors, and their original licensing agreements have been maintained in the source code where appropriate.
You are free to use this source code and binaries however you want, modify it however you like, and use it for any purpose you like, personal or commercial. All I ask is two things:
1. If you redistribute the source code, modified or unmodified, give me a shout out in the comments or something
2. If you do something really cool and make big and/or useful improvements, consider sharing it with the rest of the world (this is not mandatory, but it is the nice thing to do). I'm particularly interested in the improvements people make to the source, and always appreciate the feedback.
Obviously the Boost Library is covered by Boost's own licensing agreement which you will need to observe if you decide to use the portions of code that interface with it (the Regular Expression functionality). And Microsoft has their own licensing agreements you might need to review when before distributing programs compiled using the Platform SDK.
In the NYSIIS algorithm I am getting what I believe is an incorrect result. The algorithm states:
But in my results, it doesn't look like the K is being replaced.
(1 row(s) affected)
I was able to confirm the issue and fix it. I've resubmitted the recompiled binaries and the fixed source code to Steve and asked him to repost. I also sent you a private message, in case you want me to send the ZIP file directly to you.
I didn't compile it on x64, but the source code is available for download here: http://www.sqlservercentral.com/products/mcoles/default.asp. If you download and compile the source code targeted for x64, I don't know of any reason it shouldn't work. If you decide to test it on x64, I'd be interested in your results.