xinyadu / nqg

neural question generation for reading comprehension

Home Page:https://arxiv.org/abs/1705.00106

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About evaluation

Embedding opened this issue · comments

Hi , thank you for your nice contribution!
I encounter problem in evaluation:
scores:

Traceback (most recent call last):
File "eval.py", line 101, in
eval(args.out_file, args.src_file, args.tgt_file)
File "eval.py", line 91, in eval
return QGEval.evaluate()
File "/home/zhaozhe/Desktop/opennmt/OpenNMT-py-master/qgevalcap/eval.py", line 24, in evaluate
(Meteor(),"METEOR"),
File "/home/zhaozhe/Desktop/opennmt/OpenNMT-py-master/qgevalcap/meteor/meteor.py", line 29, in init
stderr=subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

I can not figure out why meteor can not be calculated

It "works" using python3 instead of python2.7. But i have problems with the imports of the scorer modules. ModuleNotFoundError: No module named 'bleu_scorer'

EDIT
Fixed the module error by changing import in bleu.py to "from bleu.bleu_scorer import BleuScorer"

EDIT2
further trying to run the eval, it seems the python code is written in python2 not 3

Same error. I run with python2.7