pattern icon indicating copy to clipboard operation
pattern copied to clipboard

from pattern.en import conjugate get zipfile.BadZipFile error

Open shizi626 opened this issue 5 years ago • 4 comments

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.

shizi626 avatar Dec 12 '18 13:12 shizi626

I have the same issue, :(

luzhongqiu avatar Jan 16 '19 05:01 luzhongqiu

same here

emilmuller avatar Mar 05 '19 14:03 emilmuller

Same here. (Using Python 2.7.15 via pyenv on Mac OS Mojave version 10.14.3.)

tarskiandhutch avatar Mar 20 '19 16:03 tarskiandhutch

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".

kazemihabib avatar Aug 03 '19 12:08 kazemihabib