Mercurial > repos > plus91-technologies-pvt-ltd > ss_test_tool
comparison 2.4/lib/perl5/x86_64-linux-gnu-thread-multi/Text/LevenshteinXS.pm @ 2:ceb6adffc4e2 draft
Uploaded
| author | plus91-technologies-pvt-ltd |
|---|---|
| date | Wed, 04 Jun 2014 08:00:42 -0400 |
| parents | 00b9898b8510 |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1c4234620728 | 2:ceb6adffc4e2 |
|---|---|
| 1 package Text::LevenshteinXS; | |
| 2 | |
| 3 use strict; | |
| 4 use warnings; | |
| 5 use Carp; | |
| 6 | |
| 7 require Exporter; | |
| 8 require DynaLoader; | |
| 9 use AutoLoader; | |
| 10 | |
| 11 our @ISA = qw(Exporter DynaLoader); | |
| 12 | |
| 13 our %EXPORT_TAGS = ( 'all' => [ qw( | |
| 14 | |
| 15 ) ] ); | |
| 16 | |
| 17 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); | |
| 18 | |
| 19 our @EXPORT = qw( | |
| 20 distance | |
| 21 ); | |
| 22 our $VERSION = '0.03'; | |
| 23 | |
| 24 bootstrap Text::LevenshteinXS $VERSION; | |
| 25 | |
| 26 1; | |
| 27 __END__ | |
| 28 | |
| 29 =head1 NAME | |
| 30 | |
| 31 Text::LevenshteinXS - An XS implementation of the Levenshtein edit distance | |
| 32 | |
| 33 =head1 SYNOPSIS | |
| 34 | |
| 35 use Text::LevenshteinXS qw(distance); | |
| 36 | |
| 37 print distance("foo","four"); | |
| 38 # prints "2" | |
| 39 | |
| 40 print distance("foo","bar"); | |
| 41 # prints "3" | |
| 42 | |
| 43 | |
| 44 =head1 DESCRIPTION | |
| 45 | |
| 46 This module implements the Levenshtein edit distance in a XS way. | |
| 47 | |
| 48 The Levenshtein edit distance is a measure of the degree of proximity between two strings. | |
| 49 This distance is the number of substitutions, deletions or insertions ("edits") | |
| 50 needed to transform one string into the other one (and vice versa). | |
| 51 When two strings have distance 0, they are the same. | |
| 52 A good point to start is: <http://www.merriampark.com/ld.htm> | |
| 53 | |
| 54 | |
| 55 =head1 CREDITS | |
| 56 | |
| 57 All the credits go to Vladimir Levenshtein the author of the algorithm and to | |
| 58 Lorenzo Seidenari who made the C implementation <http://www.merriampark.com/ldc.htm> | |
| 59 | |
| 60 | |
| 61 =head1 SEE ALSO | |
| 62 | |
| 63 Text::Levenshtein , Text::WagnerFischer , Text::Brew , String::Approx | |
| 64 | |
| 65 | |
| 66 =head1 AUTHOR | |
| 67 | |
| 68 Copyright 2003 Dree Mistrut <F<dree@friul.it>> | |
| 69 Modifications Copyright 2004 Josh Goldberg <F<josh@3io.com>> | |
| 70 | |
| 71 This package is free software and is provided "as is" without express | |
| 72 or implied warranty. You can redistribute it and/or modify it under | |
| 73 the same terms as Perl itself. | |
| 74 | |
| 75 =cut |
