Given an n-gram language model, we only calculate the scores in windows with the size 2n − 2, centered on the boundary of the substituted phrases.
n − 1 words before and after the boundaries will be included in the calculation.