Text::Levenshtein - An implementation of the Levenshtein edit distance
use Text::Levenshtein qw(distance);
# prints "2"
# prints "2" faster
# prints "2 0 3"
This module implements the Levenshtein edit distance. The Levenshtein edit distance is a measure of the degree of proximity between two strings. This distance is the number of substitutions, deletions or insertions ("edits") needed to transform one string into the other one (and vice versa). When two strings have distance 0, they are the same. A good point to start is: <http://www.merriampark.com/ld.htm>
&fastdistance can be called with two scalars and is faster in most cases.
See also Text::LevenshteinXS on CPAN if you do not require a perl-only implementation. It is extremely faster in nearly all cases.
See also Text::WagnerFischer on CPAN for a configurable edit distance, i.e. for configurable costs (weights) for the edits.
Copyright 2002 Dree Mistrut <email@example.com>
This package is free software and is provided "as is" without express or implied warranty. You can redistribute it and/or modify it under the same terms as Perl itself.
To install Text::Levenshtein, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.