n − 2, there can be no n-grams that feature the last n−r −1 tokens in the r'th position or the first n − r − 1 tokens in the (n − r + 1)'th position.
this is easily tackled computationally by assuming that the terminal n-gram replaces these missing n-grams for near-terminal tokens in constraint (6).