Talk:Algorithm Implementation/Strings/Levenshtein distance

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search
  • This page could use a little bit of test code to demonstrate the algorithms do work on some inputs. —The preceding unsigned comment was added by 76.186.105.183 (talkcontribs) .

Does anyone recognise the "Teslock" language? I can't find any reference to it aside from this page. Di Gama (talk) 23:14, 28 March 2008 (UTC)

Me either. And it's hard to believe a language that absurdly verbose actually exists. Except if it had been invented specifically to cause repetitive strain injury. --84.184.173.186 (talk) 06:08, 28 January 2009 (UTC)

The alternative C++ algorithm is wrong.

[edit] Bug in Python implementation

The current Python implementation works as follows:

>>> levenshtein('cab','ab') 0

And I would not call it “pythonic”. It has an abbreviated name, crams the suite of `if`s into the same line, doesn't have spaces around the `+` operators and has a liner longer than 80 characters. Poor choice of names and three violations of the style guide (PEP008) in four lines. Python "culture" favors readability over terseness -- this code snippet does not. --BlackJack (talk) 04:57, 3 June 2009 (UTC)

[edit] Ruby implementation

The proposed Ruby implementation is awfully slow ! Even unusable... I've found that : http://text.rubyforge.org/classes/Text/Levenshtein.html Do you think we could take the code since it's MIT licence ?