1Text::Levenshtein::DameUrsaeur::CPoPn(t3r)ibuted Perl DoTceuxmte:n:tLaetvieonnshtein::Damerau::PP(3)
2
3
4

NAME

6       Text::Levenshtein::Damerau::PP - Pure Perl Damerau Levenshtein edit
7       distance.
8

SYNOPSIS

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

DESCRIPTION

16       Returns the true Damerau Levenshtein edit distance of strings with
17       adjacent transpositions. Pure Perl implementation. Works correctly with
18       utf8.
19
20               use Text::Levenshtein::Damerau::PP qw/pp_edistance/;
21               use utf8;
22
23               pp_edistance('ⓕⓞⓤⓡ','ⓕⓤⓞⓡ'),
24               # prints 1
25

METHODS

27   pp_edistance
28       Arguments: source string and target string.
29
30OPTIONAL 3rd argument int (max distance; only return results with
31           $int distance or less). 0 = unlimited. Default = 0.
32
33       Returns: int that represents the edit distance between the two
34       argument. Stops calculations and returns -1 if max distance is set and
35       reached.
36
37       Function to take the edit distance between a source and target string.
38       Contains the actual algorithm implementation.
39
40               use Text::Levenshtein::Damerau::PP qw/pp_edistance/;
41               print pp_edistance('Neil','Niel');
42               # prints 1
43
44               print pp_edistance('Neil','Nielx',1);
45               # prints -1
46

SEE ALSO

48       •   Text::Levenshtein::Damerau
49
50       •   Text::Levenshtein::Damerau::XS
51

BUGS

53       Please report bugs to:
54
55       <https://rt.cpan.org/Public/Dist/Display.html?Name=Text-Levenshtein-Damerau>
56

AUTHOR

58       Nick Logan <ug@skunkds.com>
59
61       This library is free software; you can redistribute it and/or modify it
62       under the same terms as Perl itself.
63
64
65
66perl v5.36.0                      2023-01-20 Text::Levenshtein::Damerau::PP(3)
Impressum