FN 1.7 pre-trained targetid model throws AttributeError: 'Sentence' object has no attribute 'tokens'
ancadumitrache opened this issue · 1 comments
ancadumitrache commented
I have an error running the targetid model that was pre-trained on FN 1.7. I am trying to do prediction on unannotated data. The error appears when loading the pretrained Glove embeddings. Here is the console output:
Reading pretrained embeddings from data/glove.6B.100d.txt ...
Traceback (most recent call last):
File "{$HOME}/anaconda3/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "{$HOME}/anaconda3/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "{$HOME}/open-sesame/sesame/targetid.py", line 87, in <module>
instances = [make_data_instance(line, i) for i,line in enumerate(fin)]
File "sesame/raw_data.py", line 25, in make_data_instance
instance = CoNLL09Example(sentence, elements)
File "sesame/conll09.py", line 94, in __init__
FrameSemParse.__init__(self, sentence)
File "sesame/frame_semantic_graph.py", line 69, in __init__
self.tokens = sentence.tokens
AttributeError: 'Sentence' object has no attribute 'tokens'
ancadumitrache commented
The problem was with my input file - it cannot have any empty lines and works only with ASCII characters.