@classmethod
    def poisson_stirling(cls, *marginals):
        """Scores ngrams using the Poisson-Stirling measure."""
        exp = (_product(marginals[UNIGRAMS]) /
               (marginals[TOTAL] ** (cls._n - 1)))
        return marginals[NGRAM] * (_log2(marginals[NGRAM] / exp) - 1)
dataset/ETHPy150Open nltk/nltk/nltk/metrics/association.py/NgramAssocMeasures.poisson_stirling/original