@classmethod
    def phi_sq(cls, *marginals):
        """Scores bigrams using phi-square, the square of the Pearson correlation
        coefficient.
        """
        n_ii, n_io, n_oi, n_oo = cls._contingency(*marginals)

        return ((n_io*n_oi - n_ii*n_oo)**2 /
                ((n_ii + n_io) * (n_ii + n_oi) * (n_io + n_oo) * (n_oi + n_oo)))
dataset/ETHPy150Open nltk/nltk/nltk/metrics/association.py/BigramAssocMeasures.phi_sq/swapped operands of `-`