解决:Resource stopwords not found.
报错如下
---------------------------------------------------------------------------
LookupError Traceback (most recent call last)
E:\Users\TFX\Anaconda3\envs\tensorflow24\lib\site-packages\nltk\corpus\util.py in __load(self)
82 try:
---> 83 root = nltk.data.find("{}/{}".format(self.subdir, zip_name))
84 except LookupError:
E:\Users\TFX\Anaconda3\envs\tensorflow24\lib\site-packages\nltk\data.py in find(resource_name, paths)
582 resource_not_found = "\n%s\n%s\n%s\n" % (sep, msg, sep)
--> 583 raise LookupError(resource_not_found)
584
LookupError:
**********************************************************************
Resource stopwords not found.
Please use the NLTK Downloader to obtain the resource:
>>> import nltk
>>> nltk.download('stopwords')
For more information see: https://www.nltk.org/data.html
Attempted to load corpora/stopwords.zip/stopwords/
Searched in:
- 'C:\\Users\\TFX/nltk_data'
- 'E:\\Users\\TFX\\Anaconda3\\envs\\tensorflow24\\nltk_data'
- 'E:\\Users\\TFX\\Anaconda3\\envs\\tensorflow24\\share\\nltk_data'
- 'E:\\Users\\TFX\\Anaconda3\\envs\\tensorflow24\\lib\\nltk_data'
- 'C:\\Users\\TFX\\AppData\\Roaming\\nltk_data'
- 'C:\\nltk_data'
- 'D:\\nltk_data'
- 'E:\\nltk_data'
**********************************************************************
During handling of the above exception, another exception occurred:
LookupError Traceback (most recent call last)
<ipython-input-3-c87583f8fb10> in <module>
5 from tensorflow.keras.preprocessing.sequence import pad_sequences
6 from nltk.corpus import stopwords
----> 7 STOPWORDS = set(stopwords.words('english'))
E:\Users\TFX\Anaconda3\envs\tensorflow24\lib\site-packages\nltk\corpus\util.py in __getattr__(self, attr)
118 raise AttributeError("LazyCorpusLoader object has no attribute '__bases__'")
119
--> 120 self.__load()
121 # This looks circular, but its not, since __load() changes our
122 # __class__ to something new:
E:\Users\TFX\Anaconda3\envs\tensorflow24\lib\site-packages\nltk\corpus\util.py in __load(self)
83 root = nltk.data.find("{}/{}".format(self.subdir, zip_name))
84 except LookupError:
---> 85 raise e
86
87 # Load the corpus.
E:\Users\TFX\Anaconda3\envs\tensorflow24\lib\site-packages\nltk\corpus\util.py in __load(self)
78 else:
79 try:
---> 80 root = nltk.data.find("{}/{}".format(self.subdir, self.__name))
81 except LookupError as e:
82 try:
E:\Users\TFX\Anaconda3\envs\tensorflow24\lib\site-packages\nltk\data.py in find(resource_name, paths)
581 sep = "*" * 70
582 resource_not_found = "\n%s\n%s\n%s\n" % (sep, msg, sep)
--> 583 raise LookupError(resource_not_found)
584
585
LookupError:
**********************************************************************
Resource stopwords not found.
Please use the NLTK Downloader to obtain the resource:
>>> import nltk
>>> nltk.download('stopwords')
For more information see: https://www.nltk.org/data.html
Attempted to load corpora/stopwords
Searched in:
- 'C:\\Users\\TFX/nltk_data'
- 'E:\\Users\\TFX\\Anaconda3\\envs\\tensorflow24\\nltk_data'
- 'E:\\Users\\TFX\\Anaconda3\\envs\\tensorflow24\\share\\nltk_data'
- 'E:\\Users\\TFX\\Anaconda3\\envs\\tensorflow24\\lib\\nltk_data'
- 'C:\\Users\\TFX\\AppData\\Roaming\\nltk_data'
- 'C:\\nltk_data'
- 'D:\\nltk_data'
- 'E:\\nltk_data'
**********************************************************************
解决方法
python
>>> import nltk
>>> nltk.download('stopwords')
error: resource android:attr/fontVariationSettings resource android:attr/ttcIndex not found.
在最外层的build.gradle allprojects{}节点中加入// configurations.all {// resolutionStrategy {// eachDependency { DependencyResolveDetails details ->// if (details.reques...
error: resource android:attr/dialogCornerRadius not found. Message{kind=ERROR, text=error: resource
错误提示:error: resource android:attr/dialogCornerRadius not found.Message{ki
mysql 随机抽取 mysql随机抽取3个员工去值日
1. 引言现在有一个需求是从一个单词表中每次随机选取三个单词。这个表的建表语句和如下所示:mysql> Create table 'words'(
'id' int(11) not null auto_increment;
'word' varchar(64) default null;
primary key ('id')
) ENGINE=InnoDB;然后我们向