我的Python版本是win32上的3.5版本。我成功地用安装了自动更正模块
pip install autocorrect
但是,当我尝试导入它时
^{pr2}$我得到以下错误:
Traceback (most recent call last):
File "<ipython-input-6-09b8d81ac4fb>", line 1, in <module>
runfile('C:/Users/AERizzo/Documents/Python Scripts/BagOfWords_v3.py',
wdir='C:/Users/AERizzo/Documents/Python Scripts')
File "C:\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 685, in runfile
execfile(filename, namespace)
File "C:\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 85, in execfile
exec(compile(open(filename, 'rb').read(), filename, 'exec'), namespace)
File "C:/Users/AERizzo/Documents/Python Scripts/BagOfWords_v3.py", line 11, in <module>
from autocorrect import spell
File "C:\Anaconda3\lib\site-packages\autocorrect\__init__.py", line 16, in <module>
from autocorrect.nlp_parser import NLP_COUNTS
File "C:\Anaconda3\lib\site-packages\autocorrect\nlp_parser.py", line 26, in <module>
NLP_WORDS, NLP_COUNTS = parse('big.txt')
File "C:\Anaconda3\lib\site-packages\autocorrect\nlp_parser.py", line 20, in parse
words = words_from_archive(lang_sample, include_dups=True)
File "C:\Anaconda3\lib\site-packages\autocorrect\utils.py", line 28, in words_from_archive
with closing(t.extractfile(tar_path)) as f:
File "C:\Anaconda3\lib\tarfile.py", line 2066, in extractfile
tarinfo = self.getmember(member)
File "C:\Anaconda3\lib\tarfile.py", line 1743, in getmember
raise KeyError("filename %r not found" % name)
KeyError: "filename 'words\\\\big.txt' not found"
我已经调查过实用工具.py它似乎在从一个文件中读取文字.bz2. 我打开了bz2档案大.txt文件确实在那里。可能是什么问题?在
目前没有回答
相关问题 更多 >
编程相关推荐