textstat/resources/TextStat.py
def pointwiseMI(ngram, ngrammodel, unigrammodel):
   """Return the Mutual Information score for an N-gram based on the N-gram
      frquency profile and the individual frequencies.
   """
   return ngrammodel.get(ngram, 0.000000001) * log(ngrammodel.get(ngram, 0.000000001) / reduce(mul, (unigrammodel.get(i, 0.000000001) for i in ngram )), 2)
Return the Mutual Information score for an N-gram based on the N-gram
      frquency profile and the individual frequencies.
   
Return the Mutual Information score for an N-gram based on the N-gram
frquency profile and the individual frequencies.
Return the Mutual Information score for an N - gram based on the N - gram frquency profile and the individual frequencies .
def pointwiseMI(ngram, ngrammodel, unigrammodel):
   return ngrammodel.get(ngram, 0.000000001) * log(ngrammodel.get(ngram, 0.000000001) / reduce(mul, (unigrammodel.get(i, 0.000000001) for i in ngram )), 2)
def pointwiseMI ( ngram , ngrammodel , unigrammodel ) : return ngrammodel . get ( ngram , 0.000000001 ) * log ( ngrammodel . get ( ngram , 0.000000001 ) / reduce ( mul , ( unigrammodel . get ( i , 0.000000001 ) for i in ngram ) ) , 2 )
Return the Mutual Information score for an N-gram based on the N-gram
frquency profile and the individual frequencies.
Return the Mutual Information score for an N - gram based on the N - gram frquency profile and the individual frequencies .
"""Return the Mutual Information score for an N-gram based on the N-gram
      frquency profile and the individual frequencies.
   """
ngram
ngrammodel
unigrammodel