Skip to content
New issue

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

Error with NLTK #39

Open
Astraport opened this issue Oct 13, 2019 · 0 comments
Open

Error with NLTK #39

Astraport opened this issue Oct 13, 2019 · 0 comments

Comments

@Astraport
Copy link

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)`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant