Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
1.9-compatible version of the Levenshtein gem
C Ruby
tag: v0.3.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ext/levenshtein
lib
test
.gitignore
CHANGELOG
Gemfile
LICENSE
README
Rakefile
levenshtein-19.gemspec

README

The Levenshtein distance is a metric for measuring the amount of difference
between two sequences (i.e., the so called edit distance). The Levenshtein
distance between two sequences is given by the minimum number of operations
needed to transform one sequence into the other, where an operation is an
insertion, deletion, or substitution of a single element.

The two sequences can be two strings, two arrays, or two other objects.
Strings, arrays and arrays of strings are handled with optimized (very fast) C
code. All other sequences are handled with generic (fast) C code.

More information about the Levenshtein distance algorithm:
http://en.wikipedia.org/wiki/Levenshtein_distance .

NOTE: This gem was written by Erik Veenstra. I have made slight modifications
to it for compatibility with Ruby 1.9.
Something went wrong with that request. Please try again.