I'm using windows system, python 3.7 when I install:
import nltk
nltk.download('reuters')
it has no problem to import, and I also already install nltk in my cmd
but when I conduct the code:
import matplotlib.pyplot as plt
from collections import Counter
from nltk.corpus import reuters
import re
import spacy
nlp = spacy.load('en', disable=['parser', 'tagger'])
reuters_fileids = reuters.fileids()
reuters_nlp = [nlp(re.sub('\s+',' ', reuters.raw(i)).strip()) for i in reuters_fileids[:100]]
label_counter = Counter()
it has some Error, and I don't know how to fix it... However, the code works well on my MacBook I'm wondering what's going on with the windows system p.s I use anaconda, and on the windows computer, the anaconda is installed on E:\
Resource reuters not found.
Please use the NLTK Downloader to obtain the resource:
>>> import nltk
>>> nltk.download('reuters')
Searched in:
- 'C:\\Users\\user/nltk_data'
- 'C:\\nltk_data'
- 'D:\\nltk_data'
- 'E:\\nltk_data'
- 'E:\\Anaconda\\nltk_data'
- 'E:\\Anaconda\\share\\nltk_data'
- 'E:\\Anaconda\\lib\\nltk_data'
- 'C:\\Users\\user\\AppData\\Roaming\\nltk_data'