pattern
pattern copied to clipboard
from pattern.en import conjugate get zipfile.BadZipFile error
I dived into source code and found that in pattern\text\en\wordnet\__init__.py
when trying get necessary corpora of nltk, the code(as below) doesn't handle zipfile.BadZipFile: File is not a zip file
error
for token in ("wordnet", "wordnet_ic", "sentiwordnet"):
try:
nltk.data.find("corpora/" + token)
And I find that download these packages("wordnet", "wordnet_ic", "sentiwordnet")
from nltk
mannually can fix this bug.
I have the same issue, :(
same here
Same here. (Using Python 2.7.15 via pyenv on Mac OS Mojave version 10.14.3.)
Run the following command in the python shell:
>>> import nltk
>>> nltk.download()
A NLTK Downloader will open. Go to the Corpora tab and download the "wordnet", "wordnet_ic", "sentiwordnet".