- SEE ALSO
- REQUESTS AND BUGS
- COPYRIGHT AND LICENSE
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;
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.
$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.
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.
You can also look for information at:
GitHub Source Repository
AnnoCPAN: Annotated CPAN documentation
RT: CPAN's request tracker
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>