nltk.BigramCollocationFinder.from_words

classmethod BigramCollocationFinder.from_words(words, window_size=2)[source]

Construct a BigramCollocationFinder for all bigrams in the given sequence. When window_size > 2, count non-contiguous bigrams, in the style of Church and Hanks’s (1990) association ratio.