'Print collocations derived from the text, ignoring stopwords.
:seealso: find_collocations
:param num: The maximum number of collocations to print.
:type num: int
:param window_size: The number of tokens spanned by a collocation (default=2)
:type window_size: int'

def collocations(self, num=20, window_size=2):

    if (not ((u'_collocations' in self.__dict__) and (self._num == num) and (self._window_size == window_size))):
        self._num = num
        self._window_size = window_size
        from nltk.corpus import stopwords
        ignored_words = stopwords.words(u'english')
        finder = BigramCollocationFinder.from_words(self.tokens, window_size)
        finder.apply_freq_filter(2)
        finder.apply_word_filter((lambda w: ((len(w) < 3) or (w.lower() in ignored_words))))
        bigram_measures = BigramAssocMeasures()
        self._collocations = finder.nbest(bigram_measures.likelihood_ratio, num)
    colloc_strings = [((w1 + u'    ') + w2) for (w1, w2) in self._collocations]
    print(tokenwrap(colloc_strings, separator=u';    '))
