Levenshtein

Ruby

About

Note: This is now part of the Text project, hosted on RubyForge. For newer releases, visit Text on RubyForge.

The Levenshtein distance is a measure of how similar two strings s and t are, calculated as the number of deletions/insertions/substitutions needed to transform s into t. The greater the distance, the more the strings differ.

The Levenshtein distance is also sometimes referred to as the easier-to-pronounce-and-spell ‘edit distance’.

Revision history

Licence

Copyright © 2005 Paul Battley

Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument.

DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.

Download

Comments

Skip to the comment form

  1. nieruihan

    Wrote at 2005-08-26 05:39 UTC using Firefox 1.0.6 on Windows XP:

    Hi,

    The link to levenshtein.rb (http://po-ru.com/files/levenshtein/1.2/levenshtein.rb) returns:

    Not Found

    The requested URL /files/levenshtein/1.2/levenshtein.rb was not found on this server.
  2. Paul Battley

    Wrote at 2005-08-26 10:08 UTC using Safari 412.2.2 on Mac OS X:

    Thanks. It should be fixed now.

Leave a comment

Please read the comment guidelines before posting. Comments are Gravatar-enabled. Your email address will not be published.

To prove that you’re human, type human in the Bot check field.