liuweichuan has asked for the wisdom of the Perl Monks concerning the following question:

which modules or functions for comparing text similarity by perl

Replies are listed 'Best First'.
Re: Compare text similarity
by Discipulus (Canon) on Feb 07, 2017 at 08:12 UTC
    levenshtein distance is the keyword. Search here at PM and on CPAN to see examples and modules.

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re: Compare text similarity
by kcott (Archbishop) on Feb 07, 2017 at 08:23 UTC
      compare two texts/content is the similar or not, such as "i like this book" and "i like the book", they are same, and very similar.
      like text::compare , but no support jp and zh char-set.
Re: Compare text similarity
by ablanke (Monsignor) on Feb 07, 2017 at 08:26 UTC
Re: Compare text similarity
by madtoperl (Hermit) on Feb 07, 2017 at 10:41 UTC
    Data::Compare
    You can look into below link for more details,
    http://perl.mines-albi.fr/perl5.8.5/site_perl/5.8.5/Data/Compare.html

      Data::Compare will tell you if data structures are identical, not similar as OP mentioned. Take a look at some of the existing responses for recommendations.