Text::NSP::Measures::3D::MI::ps

Text::NSP::Measures::3D::MI::ps is a Perl module that implements Poisson Stirling Measure for trigrams.
Download

Text::NSP::Measures::3D::MI::ps Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Text::NSP::Measures::3D::MI::ps team
  • Publisher web site:
  • http://search.cpan.org/~tpederse/Text-NSP-1.03/lib/Text/NSP/Measures/3D/MI/ps.pm

Text::NSP::Measures::3D::MI::ps Tags


Text::NSP::Measures::3D::MI::ps Description

Text::NSP::Measures::3D::MI::ps is a Perl module that implements Poisson Stirling Measure for trigrams. Text::NSP::Measures::3D::MI::ps is a Perl module that implements Poisson Stirling Measure for trigrams.SYNOPSISBasic Usage use Text::NSP::Measures::3D::MI::ps; $ps_value = calculateStatistic( n111=>10, n1pp=>40, np1p=>45, npp1=>42, n11p=>20, n1p1=>23, np11=>21, nppp=>100); if( ($errorCode = getErrorCode())) { print STDERR $erroCode." - ".getErrorMessage()."n"; } else { print getStatisticName."value for bigram is ".$ps_value."n"; }The log-likelihood ratio measures the devitation between the observed data and what would be expected if < word1 >, < word2 > and < word3 > were independent. The higher the score, the less evidence there is in favor of concluding that the words are independent.The expected values for the internal cells are calculated by taking the product of their associated marginals and dividing by the sample size, for example: n1pp * np1p * npp1 m111= -------------------- npppThe poisson stirling measure is a negative lograthimic approximation of the poisson-likelihood measure. It uses the stirlings firmula to approximate the factorial in poisson-likelihood measure. It is computed as follows:Posson-Stirling = n111 * ( log(n111) - log(m111) - 1)MethodscalculateStatistic() - This method calculates the ps valueINPUT PARAMS : $count_values .. Reference of an hash containing the count values computed by the count.pl program.RETURN VALUES : $poissonStirling .. Poisson-Stirling value for this trigram.getStatisticName() - Returns the name of this statisticINPUT PARAMS : noneRETURN VALUES : $name .. Name of the measure. Requirements: · Perl


Text::NSP::Measures::3D::MI::ps Related Software