It is hard to use this formula to deal with n-grams (n>2), because it is a knotty problem to divide n-grams effectively into x, y parts.
we will use the parameter mi f improved by Silva & Lopes, and the calculation formula is defined as follows: is the probability that occurs in the given corpus.