Levenshteinenator

Enter two strings in the fields below, then click “Levenshteinenate me!” The Levenshteinenator will then compute the Levenshtein distance between the two strings. To see my JavaScript implementation of the algorithm, take a look here.


String A [Supercalifragilisticexpialidocious, gumbo]
String B [Supercalifrajilisticexpialidotious, gambol]

Distance
Elapsed Time (ms)



Comments

So…What do you think?

This does not work in opera
Posted by: Posted by: asdlfkasdf
May 22, 2006, 3:29 am EDT
Uh, could you elaborate? Do you get a JavaScript error I could use to track down the problem?
Posted by: Posted by: Andrew Hedges, http://andrew.hedges.name/
June 16, 2006, 5:48 pm EDT
what the hell is this supposed to be? What is Levenshenstein or whatever???
Posted by: >><>
July 10, 2006, 7:45 pm EDT
Hello Andrew, At first I want to thank you for your website contents. My question, how may the Levenshtein distance help me to implement a suggestion for a second search (like google does) ? I can't put the whole index through the Levenshtein distance each time there is a search. Kindest regards, Erik
Posted by: Posted by: Dutchman, http://www.gaf.tm.fr
August 28, 2006, 7:26 pm EDT
Erik,

The Levenshtein algorithm is far too inefficient to use on a large scale. Soundex is a better way to go. What I have done in the past is keep a soundex version of each string in the database and compare new strings against the ones stored there. Good luck!

–Andrew
Posted by: Posted by: Andrew Hedges, http://andrew.hedges.name/
August 28, 2006, 11:32 pm EDT
Very nice
Posted by: Posted by: Dave, http://avitas.net/
December 16, 2006, 1:37 pm EST
It's ok, but the number value used as the 'Password strength' indicator means nothing to the user. Howwould they know the difference between it showing the number 5 and the number 25? Other password strength indicators I've seen use graphical and textual representation of how secure the password is. I know yours is the 'simple' version but you should probably at least put the strength value of out another value like 5/30. Other than that it's a good start for a simple check.
Posted by: Posted by: Ryan, n/a
March 6, 2007, 12:38 pm EST
I think your comments form is messed up, I was comenting on the password strength form but it looks like its submited it to this 'Levenshtein algorithm' page. And your spam controler has the same characters I had to enter before - how it that good?
Posted by: Posted by: Ryan, n/a
March 6, 2007, 12:41 pm EST
Nice
Posted by: Posted by: Emblem, http://kipse.hopto.org/mybb/
March 18, 2007, 3:15 pm EDT
not bad. I have been traversing many sites looking for scripts to do this, and also the best rules to define what makes a strong password as well (e.g. at least 3 lowercase, 3 uppercase, 2 digits, total 8 chars, and not a word in dictionary, etc....). Your is one of the only to mention not using username in password :) but I see it happen so often. i used "password strength meter" on google to find your site, and these 10 others. thanks for sharing. P.S. on your spam control image (captcha), I just found this amazing captcha project from carnegie university called reCAPTCHA which is free, but helps to digitize books (http://recaptcha.net/learnmore.html)
Posted by: Posted by: web design guy, http://verangomedia.com
May 26, 2007, 2:52 am EDT
hello, with respect to the algorithm, does it matter whether one constructs the matrix with the source string length across the top for the first row and the target string down the side for the first column or vice versa? thanks.
Posted by: bob
June 18, 2007, 5:56 am EDT
Hi Bob, It shouldn't make any difference. Levenshtein should calculate the same distance either way. -Andrew
Posted by: Posted by: Andrew Hedges, http://andrew.hedges.name/
June 18, 2007, 6:18 am EDT
thanks Andrew. i'm doing something similar in C and was looking at printing out the contents of the matrix. thanks.
Posted by: bob
June 18, 2007, 12:57 pm EDT
hello Andrew, is there a way to track the actual transformation that took place. what I mean is what and how many of each operation(insert,del,sub) were required?
Posted by: bob
June 19, 2007, 7:05 am EDT
dhfhfhhdh
Posted by: Posted by: fsdghdfhhdfh, dfhfhh
July 2, 2007, 6:26 am EDT
I found another two password strength checkers and their algorithms based on words dictionary. Try one at http://www.microsoft.com/protect/yourself/password/checker.mspx and one at http://www.itsimpl.com. Please, try it, and write your thoughts. Good Luck! Jetman
Posted by: Posted by: Jetman
August 30, 2007, 3:49 pm EDT
sdgfdgdfgfd
Posted by: Posted by: asfsdg, sgdfgdgdf
September 21, 2007, 7:25 am EDT

Add Your Comment

Your Name:

Email Address:
Email addresses will be obfuscated

Web Site:

Comment:

Spam Control:
Please enter the following below: [If you need assistance with this, please email me at andrew at hedges dot name.]

Comment Preview