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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: N-gram comparison
by Corion (Patriarch) on Jun 29, 2011 at 10:20 UTC

    Have you searched CPAN? Ngram or Trigram

    Alternatively, write it yourself. It's not hard.

      I second this :) if you're interested in more about n-grams you might wanna read Manning S. , Schutze - "Foundations of statistical natural language processing" chapter 6
Re: N-gram comparison
by choroba (Cardinal) on Jun 29, 2011 at 10:20 UTC
    Just count the number of occurrences of each trigram in a hash for each sentence, then compare the hashes.
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: N-gram comparison
by planetscape (Chancellor) on Jun 29, 2011 at 21:44 UTC