导入nltk后nltk.download()无效

时间:2015-10-05 11:42:40

标签: python nltk

每次都会出现此错误消息

import nltk
nltk.download()
   Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "C:\Python34\Lib\site-packages\nltk\downloader.py", line 655, in          download

    self._interactive_download()
    File "C:\Python34\Lib\site-packages\nltk\downloader.py", line 974, in      _interactive_download
DownloaderGUI(self).mainloop()
File "C:\Python34\Lib\site-packages\nltk\downloader.py", line 1234, in __init__
self._fill_table()
File "C:\Python34\Lib\site-packages\nltk\downloader.py", line 1530, in _    fill_table
items = self._ds.collections()
File "C:\Python34\Lib\site-packages\nltk\downloader.py", line 499, in collections
self._update_index()
File "C:\Python34\Lib\site-packages\nltk\downloader.py", line 825, in _update_index
ElementTree.parse(compat.urlopen(self._url)).getroot())
File "C:\Python34\lib\xml\etree\ElementTree.py", line 1187, in parse
tree.parse(source, parser)
File "C:\Python34\lib\xml\etree\ElementTree.py", line 598, in parse
self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0

下载器窗口打开时没有任何内容或列表。我检查了downloader.py,它包含语料库的正确和新的默认链接。

我正在使用Windows标准版。

0 个答案:

没有答案