edu.northwestern.at.utils.corpuslinguistics
Class BigramLogLikelihood

java.lang.Object
  extended by edu.northwestern.at.utils.corpuslinguistics.BigramLogLikelihood

public class BigramLogLikelihood
extends java.lang.Object

Computes Dunnett's log-likelihood for bigrams.


Constructor Summary
protected BigramLogLikelihood()
          Don't allow instantiation but do allow overrides.
 
Method Summary
static double calculateLogLikelihood(double c1, double c2, double c12, double n)
          Compute log likelihood value for a bigram.
protected static double logLike(double k, double n, double x)
          Compute one part of log likelihood value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BigramLogLikelihood

protected BigramLogLikelihood()
Don't allow instantiation but do allow overrides.

Method Detail

logLike

protected static double logLike(double k,
                                double n,
                                double x)
Compute one part of log likelihood value.


calculateLogLikelihood

public static double calculateLogLikelihood(double c1,
                                            double c2,
                                            double c12,
                                            double n)
Compute log likelihood value for a bigram.

Parameters:
c1 - Count of first word in bigram.
c2 - Count of second word in bigram.
c12 - Count of bigram.
n - Corpus size.
Returns:
The log-likelihood value.