Text::Levenshtein::BV - Bit Vector (BV) implementation of the Levenshtein Algorithm
use Text::Levenshtein::BV; $alg = Text::Levenshtein::BV->new; @ses = $alg->SES(\@a,\@b);
Text::Levenshtein::BV implements the Levenshtein using bit vectors and is faster in most cases than the naive implementation using a match matrix.
Creates a new object which maintains internal storage areas for the SES computation. Use one of these per concurrent SES() call.
Finds a Shortest Edit Script (SES), taking two arrayrefs as method arguments. It returns an array reference of corresponding indices, which are represented by 2-element array refs.
Calculates the edit distance, taking two arrayrefs as method arguments. It returns an integer.
Reformats the alignment returned by SES into an array of two sequences.
Renders an array of strings into a string.
Does the revers of method hunks2sequences.
Returns hunks of aligned characters.
Calculates the distance from alignment.
None by design.
Until release of version 1.00 the included methods, names of methods and their interfaces are subject to change.
Beginning with version 1.00 the specification will be stable, i.e. not changed between major versions.
[Hyy03] Hyyrö, Heikki. (2003). A Bit-Vector Algorithm for Computing Levenshtein and Damerau Edit Distances. In Nord. J. Comput. 10. 29-39.
[Hyy04a] Hyyrö, Heikki. (2004). A Note on Bit-Parallel Alignment Computation. In M. Simanek and J. Holub, editors, Stringology, pages 79-87. Department of Computer Science and Engineering, Faculty of Electrical Engineering, Czech Technical University, 2004.
[Hyy04b] Hyyrö, Heikki. (2004). Bit-parallel LCS-length computation revisited. In Proc. 15th Australasian Workshop on Combinatorial Algorithms (AWOCA 2004), 2004.
[HN02] Hyyrö, Heikki and Navarro, Gonzalo. Faster bit-parallel approximate string matching. In Proc. 13th Combinatorial Pattern Matching (CPM 2002), LNCS 2373, pages 203–224, 2002.
Text::Levenshtein
http://github.com/wollmers/Text-Levenshtein-BV
Helmut Wollmersdorfer <helmut@wollmersdorfer.at>
Copyright 2016-2020 by Helmut Wollmersdorfer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Text::Levenshtein::BV, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Levenshtein::BV
CPAN shell
perl -MCPAN -e shell install Text::Levenshtein::BV
For more information on module installation, please visit the detailed CPAN module installation guide.