NAME

Text::Levenshtein::Damerau::PP - Pure Perl Damerau Levenshtein edit distance

SYNOPSIS

# Normal usage through Text::Levenshtein::Damerau
use Text::Levenshtein::Damerau qw/edistance/;
use warnings;
use strict;

print edistance('Neil','Niel');
# prints 1



# Using this module directly
use Text::Levenshtein::Damerau::PP qw/pp_edistance/;
use warnings;
use strict;

print pp_edistance('Neil','Niel');
# prints 1

DESCRIPTION

Returns the true Damerau Levenshtein edit distance of strings with adjacent transpositions. Pure Perl implementation. Works correctly with utf8.

use utf8;
pp_edistance('ⓕⓞⓤⓡ','ⓕⓞⓤⓡ'), 
# prints 1

METHODS

EXPORTABLE METHODS

pp_edistance

Arguments: source string and target string.

Returns: scalar containing int that represents the edit distance between the two argument.

Function to take the edit distance between a source and target string. Contains the actual algorithm implementation.

use Text::Levenshtein::Damerau::PP qw/pp_edistance/;
print pp_edistance('Neil','Niel');
# prints 1

BUGS

Please report bugs to:

https://rt.cpan.org/Public/Dist/Display.html?Name=Text-Levenshtein-Damerau

AUTHOR

Nick Logan ugexe <ug@skunkds.com>

LICENSE AND COPYRIGHT

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.