Name : perl-Text-Fuzzy
| |
Version : 0.29
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 1.1
| Date : 2021-08-30 19:22:51
|
Group : Development/Libraries/Perl
| Source RPM : perl-Text-Fuzzy-0.29-1.1.src.rpm
|
Size : 0.11 MB
| |
Packager : (none)
| |
Summary : Partial string matching using edit distances
|
Description :
This module calculates edit distances between words, and searches arrays and files to find the nearest entry by edit distance. It handles both byte strings and character strings (strings containing Unicode), treating each Unicode character as a single entity.
use Text::Fuzzy; use utf8; my $tf = Text::Fuzzy->new (\'あいうえお☺\'); print $tf->distance (\'うえお☺\'), \"\ \";
produces output
2
(This example is included as at https://fastapi.metacpan.org/source/BKB/Text-Fuzzy-0.29/examples/unicode.pl in the distribution.)
The default edit distance is the Levenshtein one, which counts each addition (\'cat\' -> \'cart\'), substitution (\'cat\' -> \'cut\'), and deletion (\'carp\' -> \'cap\') as one unit. The Damerau-Levenshtein edit distance, which also allows transpositions (\'salt\' -> \'slat\') may also be selected with the transpositions_ok method or the trans option.
This module is particularly suited to searching for the nearest match to a term over a list of words, using the nearestv or nearest methods. It studies the target string to be matched (the first argument to new) to build information to rapidly reject mismatches in a list. Since computing the Levenshtein and Damerau-Levenshtein edit distances with the Wagner-Fischer algorithm is computationally expensive, the module offers a boost in performance for searching for a string in a list of words.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-T/openSUSE_Tumbleweed/x86_64 |