How do you find collocations in text? A collocation is a sequence of words that occurs together unusually often. python has built-in func bigrams that returns word pairs. What's left is to find bigrams that occur more often based on the frequency of individual words. Any ideas how to put it in the code?
| |||||||||||||||
feedback |
4 | Try NLTK. You will mostly be interested in There are none in this small segment, but here goes: | ||||
feedback |
1 | Here is some code that takes a list of lowercase words and returns a list of all bigrams with their respective counts, starting with the highest count. Don't use this code for large lists. ( | ||||||
feedback |
0 | |