Levenshtein in Ruby 1.9

In Ruby 1.8, I would use the gem 'levenshtein'... well that doesn't work in 1.9. So you need to install the gem 'text'.

Then the call is as simple as:

Text::Levenshtein.distance('hello', 'hell')

Are you a Git user? Let me help you make project management with Git simple. Checkout Gitpilot.

If you made it this far, you should follow me on Twitter.

-JP

Want to test-drive Bitcoin without any risk? Check out my bitcoin wallet Coinbolt. It includes test coins for free.

comments powered by Disqus