Maluuba / nlg-eval

Evaluation code for various unsupervised automated metrics for Natural Language Generation.
http://arxiv.org/abs/1706.09799
Other
1.34k stars 222 forks source link

METEOR issue #95

Closed gaobb closed 4 years ago

gaobb commented 4 years ago

$ nlg-eval --hypothesis=examples/hyp.txt --references=examples/ref1.txt --references=examples/ref2.txt

The error message is as follows:

Traceback (most recent call last): File "/usr/local/bin/nlg-eval", line 172, in compute_metrics() File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 829, in call return self.main(args, kwargs) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in invoke return callback(args, **kwargs) File "/usr/local/bin/nlg-eval", line 168, in compute_metrics nlgeval.compute_metrics(hypothesis, references, no_overlap, no_skipthoughts, no_glove) File "./nlg-eval-master/nlgeval/init.py", line 35, in compute_metrics (Meteor(), "METEOR"), File "./nlg-eval-master/nlgeval/pycocoevalcap/meteor/meteor.py", line 38, 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

gaobb commented 4 years ago

The issue has been fixed by installing java

wutaiqiang commented 4 years ago

installl JDK?i tried that and it did not work

ChawDoe commented 4 years ago

The issue has been fixed by installing java

I tried that and it also did not work.

ChawDoe commented 4 years ago

The issue has been fixed by installing java

I tried that and it also did not work.

File "D:/PythonProjects/DataProcessing/eval.py", line 140, in eval metrics_dict = compute_individual_metrics(ref_lst[0][0], can_lst[0]) File "D:\pythons\python3.7.4\lib\site-packages\nlgeval__init.py", line 102, in compute_individual_metrics (Meteor(), "METEOR"), File "D:\pythons\python3.7.4\lib\site-packages\nlgeval\pycocoevalcap\meteor\meteor.py", line 53, in init stderr=subprocess.PIPE) File "D:\pythons\python3.7.4\lib\subprocess.py", line 775, in init__ restore_signals, start_new_session) File "D:\pythons\python3.7.4\lib\subprocess.py", line 1178, in _execute_child startupinfo) FileNotFoundError: [WinError 2] 系统找不到指定的文件。 Exception ignored in: <function Meteor.del at 0x0000025588C0A4C8> Traceback (most recent call last): File "D:\pythons\python3.7.4\lib\site-packages\nlgeval\pycocoevalcap\meteor\meteor.py", line 130, in del self.close() File "D:\pythons\python3.7.4\lib\site-packages\nlgeval\pycocoevalcap\meteor\meteor.py", line 59, in close if self.meteor_p: AttributeError: 'Meteor' object has no attribute 'meteor_p'

wutaiqiang commented 4 years ago

The issue has been fixed by installing java

I tried that and it also did not work.

File "D:/PythonProjects/DataProcessing/eval.py", line 140, in eval metrics_dict = compute_individual_metrics(ref_lst[0][0], can_lst[0]) File "D:\pythons\python3.7.4\lib\site-packages\nlgevalinit.py", line 102, in compute_individual_metrics (Meteor(), "METEOR"), File "D:\pythons\python3.7.4\lib\site-packages\nlgeval\pycocoevalcap\meteor\meteor.py", line 53, in init stderr=subprocess.PIPE) File "D:\pythons\python3.7.4\lib\subprocess.py", line 775, in init restore_signals, start_new_session) File "D:\pythons\python3.7.4\lib\subprocess.py", line 1178, in _execute_child startupinfo) FileNotFoundError: [WinError 2] 系统找不到指定的文件。 Exception ignored in: <function Meteor.del at 0x0000025588C0A4C8> Traceback (most recent call last): File "D:\pythons\python3.7.4\lib\site-packages\nlgeval\pycocoevalcap\meteor\meteor.py", line 130, in del self.close() File "D:\pythons\python3.7.4\lib\site-packages\nlgeval\pycocoevalcap\meteor\meteor.py", line 59, in close if self.meteor_p: AttributeError: 'Meteor' object has no attribute 'meteor_p'

i solved that problem and write an essay in ZHIHU https://zhuanlan.zhihu.com/p/159204903 it is in Chinese

juharris commented 4 years ago

To fully "install" Java, make sure that javac and java command are available in your PATH. Try running javac -h and java -h to check.

ChawDoe commented 4 years ago

To fully "install" Java, make sure that javac and java command are available in your PATH. Try running javac -h and java -h to check.

Thank you. Problem solved.

jack-wxm commented 3 years ago

To fully "install" Java, make sure that javac and java command are available in your PATH. Try running javac -h and java -h to check.

Thank you. Problem solved.

how solved? I haved successfully installed jdk, but still have this problem. I also restart the environment file.