Text::Dice - Calculate Dice's coefficient of two strings
use Text::Dice; $coefficient = coefficient $string1, $string2; # or if you want to tokenize the strings yourself: $coefficient = coefficient \%array1, \%array2;
The Text::Dice module calculates Dice's coefficient of two strings. The main benefits of this algorithm are: true reflection of lexical similarity, robustness to changes of word order, and language independence.
Text::Dice
$coefficient = coefficient $string1, $string2 $coefficient = coefficient \@array1, \@array2
Returns a number between 0 and 1; the higher the number, the greater the similarity.
The two input strings are internally tokenized into character bigrams. If you wish to use a different tokenization method, pass in the resulting array references.
http://en.wikipedia.org/wiki/Dice%27s_coefficient
http://www.catalysoft.com/articles/StrikeAMatch.html
Please report any bugs or feature requests to http://rt.cpan.org/Public/Bug/Report.html?Queue=Text-Dice. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Text::Dice
You can also look for information at:
GitHub Source Repository
https://github.com/gray/text-dice
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Text-Dice
CPAN Ratings
http://cpanratings.perl.org/d/Text-Dice
RT: CPAN's request tracker
http://rt.cpan.org/Public/Dist/Display.html?Name=Text-Dice
Search CPAN
http://search.cpan.org/dist/Text-Dice/
Copyright (C) 2012-2015 gray <gray at cpan.org>, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
gray, <gray at cpan.org>
To install Text::Dice, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Dice
CPAN shell
perl -MCPAN -e shell install Text::Dice
For more information on module installation, please visit the detailed CPAN module installation guide.