To make a wordlist with pairs or triples of words (n-grams) such as
IN THE END
ONCE UPON A TIME
etc you will need first to compute an index file. This essentially knows the position of each separate word in your corpus.
See also : making the multi-word unit wordlist