finder = BigramCollocationFinder.from_words(nltk.corpus.genesis.words(
    'english-web.txt'))
finder = AbstractCollocationFinder.from_words(nltk.corpus.genesis.words(
    'english-web.txt', 5))
How to get n-gram collocations and association in python nltk?