nltk.TextCollection.collocations¶
-
TextCollection.
collocations
(num=20, window_size=2)¶ Print collocations derived from the text, ignoring stopwords.
Seealso: find_collocations
Parameters: - num (int) – The maximum number of collocations to print.
- window_size (int) – The number of tokens spanned by a collocation (default=2)