Python FramenetError:未知帧

Python FramenetError:未知帧,python,nlp,nltk,Python,Nlp,Nltk,我运行: 并获取以下错误: from nltk.corpus import framenet as fn fn.frames() 回溯(最近一次呼叫最后一次): 文件“/Users/me/anaconda3/envs/nlp/lib/python3.6/site packages/nltk/corpus/reader/framenet.py”,第1308行,在frame_by_name中 elt=XMLCorpusView(locpath,'frame')[0] 文件“/Users/me/an

我运行:

并获取以下错误:

from nltk.corpus import framenet as fn
fn.frames()
回溯(最近一次呼叫最后一次):
文件“/Users/me/anaconda3/envs/nlp/lib/python3.6/site packages/nltk/corpus/reader/framenet.py”,第1308行,在frame_by_name中
elt=XMLCorpusView(locpath,'frame')[0]
文件“/Users/me/anaconda3/envs/nlp/lib/python3.6/site packages/nltk/corpus/reader/xmldocs.py”,第155行,在__
encoding=self.\u detect\u编码(fileid)
文件“/Users/me/anaconda3/envs/nlp/lib/python3.6/site packages/nltk/corpus/reader/xmldocs.py”,第166行,采用“检测”编码
以open(fileid,'rb')作为填充:
NotADirectoryError:[Errno 20]不是目录:'/Users/me/nltk_data/corpora/framenet_v17.zip/framenet_v17/frame/废弃.xml'
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/Users/me/anaconda3/envs/nlp/lib/python3.6/site packages/nltk/corpus/reader/framenet.py”,第876行,在报告中__
对于自我教育:
文件“/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/collections.py”,第406行,从
try:yield self.\u func(self.\u列表[0][index])
文件“/Users/me/anaconda3/envs/nlp/lib/python3.6/site packages/nltk/corpus/reader/framenet.py”,第1407行,在框架中
f=自帧按id(fn\u fid\u或\u fname,ignorekeys)
文件“/Users/me/anaconda3/envs/nlp/lib/python3.6/site packages/nltk/corpus/reader/framenet.py”,第1268行,在框架中
按名称返回self.frame(名称,ignorekeys,check\u cache=False)
文件“/Users/me/anaconda3/envs/nlp/lib/python3.6/site packages/nltk/corpus/reader/framenet.py”,第1310行,在frame_by_name中
raise FramenetError('未知帧:{0}'。格式(fn_fname))
nltk.corpus.reader.framenet.FramenetError:未知帧:放弃

根据nltk.download()

的说明,如果运行
nltk,则会同时安装Framenet 1.5和1.7语料库。\uuuu版本\uuuu
它会返回哪个版本?我在版本
3.3
中运行了您的代码,没有收到错误。奇怪。我刚检查过:nltk.\uuuuuuu版本\uuuuuuuu'3.3'a,它正在工作。我不知道我做了什么来改变任何事情。谢谢你的帮助!也许是祈祷!哈哈
Traceback (most recent call last):
  File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/framenet.py", line 1308, in frame_by_name
    elt = XMLCorpusView(locpath, 'frame')[0]
  File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/xmldocs.py", line 155, in __init__
    encoding = self._detect_encoding(fileid)
  File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/xmldocs.py", line 166, in _detect_encoding
    with open(fileid, 'rb') as infile:
NotADirectoryError: [Errno 20] Not a directory: '/Users/me/nltk_data/corpora/framenet_v17.zip/framenet_v17/frame/Abandonment.xml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/framenet.py", line 876, in __repr__
    for elt in self:
  File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/collections.py", line 406, in iterate_from
    try: yield self._func(self._lists[0][index])
  File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/framenet.py", line 1407, in frame
    f = self.frame_by_id(fn_fid_or_fname, ignorekeys)
  File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/framenet.py", line 1268, in frame_by_id
    return self.frame_by_name(name, ignorekeys, check_cache=False)
  File "/Users/me/anaconda3/envs/nlp/lib/python3.6/site-packages/nltk/corpus/reader/framenet.py", line 1310, in frame_by_name
    raise FramenetError('Unknown frame: {0}'.format(fn_fname))
nltk.corpus.reader.framenet.FramenetError: Unknown frame: Abandonment