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
python 3.7 compatibility PEP 479: ngrams #2223
Comments
Hi @weilu-mkt, What are the values of |
Hi purificant, Thanks for your help! I just checked and find my version of nltk is 3.3. An example of the variable I just used |
Please use nltk 3.4, it's the first version with Python 3.7 support, your issue should be resolved in this version. |
I've attempted to reproduce this with nltk 3.3 as well, to confirm that it is indeed fixed in 3.4, however, I was not able to do it. My sample code:
|
Ok, thanks a lot for your help. The problem is solved and I think it is because I didn't install 3.4 successfully. |
Hello all, I have still been having this exact issue while running ngrams within Google Colab today. I checked |
Try to install the latest version of
Along the lines of https://colab.research.google.com/notebooks/snippets/importing_libraries.ipynb |
Hi,
Similar to #2148 I just found that using the command ngrams is also raising the RuntimeError: generator raised StopIteration. This happens when I try to loop over the ngrams generated, for example:
data = ngrams(sentence, 2) \\ for gram in data: \\ print(gram)
And the error happens at the second line.
Could you look into that issue as well? Thanks!
PS: I tried re-installing the package on Feb 1, 2019 and the problem seems to be there still
The text was updated successfully, but these errors were encountered: