We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I try Exploring text data with NLTK from https://github.com/mikhailklassen/Mining-the-Social-Web-3rd-Edition/blob/master/notebooks/Chapter%205%20-%20Mining%20Text%20Files.ipynb And I constantly get an error. What could be the reason? Thanks. `--------------------------------------------------------------------------- ValueError Traceback (most recent call last) in 22 23 # Frequent collocations in the text (usually meaningful phrases) ---> 24 text.collocations() 25 26 # Frequency analysis for words of interest
~\Anaconda3\lib\site-packages\nltk\text.py in collocations(self, num, window_size) 442 443 collocation_strings = [ --> 444 w1 + " " + w2 for w1, w2 in self.collocation_list(num, window_size) 445 ] 446 print(tokenwrap(collocation_strings, separator="; "))
~\Anaconda3\lib\site-packages\nltk\text.py in (.0) 442 443 collocation_strings = [ --> 444 w1 + " " + w2 for w1, w2 in self.collocation_list(num, window_size) 445 ] 446 print(tokenwrap(collocation_strings, separator="; "))
ValueError: too many values to unpack (expected 2)`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I try Exploring text data with NLTK from https://github.com/mikhailklassen/Mining-the-Social-Web-3rd-Edition/blob/master/notebooks/Chapter%205%20-%20Mining%20Text%20Files.ipynb
And I constantly get an error. What could be the reason? Thanks.
`---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
in
22
23 # Frequent collocations in the text (usually meaningful phrases)
---> 24 text.collocations()
25
26 # Frequency analysis for words of interest
~\Anaconda3\lib\site-packages\nltk\text.py in collocations(self, num, window_size)
442
443 collocation_strings = [
--> 444 w1 + " " + w2 for w1, w2 in self.collocation_list(num, window_size)
445 ]
446 print(tokenwrap(collocation_strings, separator="; "))
~\Anaconda3\lib\site-packages\nltk\text.py in (.0)
442
443 collocation_strings = [
--> 444 w1 + " " + w2 for w1, w2 in self.collocation_list(num, window_size)
445 ]
446 print(tokenwrap(collocation_strings, separator="; "))
ValueError: too many values to unpack (expected 2)`
The text was updated successfully, but these errors were encountered: