Closed eduOS closed 7 years ago
And here is the test error:
ERROR: test_rouge_for_plain_text (pyrouge.tests.Rouge155_test.PyrougeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pyrouge-0.1.3-py2.7.egg/pyrouge/tests/Rouge155_test.py", line 173, in test_rouge_for_plain_text
pyrouge_output = check_output_clean(pyrouge_command.split())
File "/usr/local/lib/python2.7/dist-packages/pyrouge-0.1.3-py2.7.egg/pyrouge/tests/Rouge155_test.py", line 17, in <lambda>
check_output_clean = lambda c: check_output(c).decode("UTF-8").strip()
File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '[u'pyrouge_evaluate_plain_text_files', u'-m', u'data/models_plain', u'-s', u'data/systems_plain', u'-sfp', u'D(\\d+).M.100.T.A', u'-mfp', u'D#ID#.M.100.T.[A-Z]', u'-id', u'1']' returned non-zero exit status 1
----------------------------------------------------------------------
Ran 11 tests in 1.435s
FAILED (errors=3)
I solved it after reading this article, which reads that:
Error Handling
If you encounter following error message when you use pythonrouge
Cannot open exception db file for reading: /home/pythonrouge/pythonrouge/RELEASE-1.5.5/data/WordNet-2.0.exc.db
you can run pythonrouge by doing following.
cd pythonrouge/RELEASE-1.5.5/data/
rm WordNet-2.0.exc.db
./WordNet-2.0-Exceptions/buildExeptionDB.pl ./WordNet-2.0-Exceptions ./smart_common_words.txt ./WordNet-2.0.exc.db
I just run the command to generate the db file.
./WordNet-2.0-Exceptions/buildExeptionDB.pl ./WordNet-2.0-Exceptions ./smart_common_words.txt ./WordNet-2.0.exc.db
Under the data directory.
Or, if on Microsoft Windows:
Remove RELEASE-1.5.5\data\WordNet-2.0.exc.db
, then from cmd.exe
:
cd RELEASE-1.5.5\data\
perl WordNet-2.0-Exceptions/buildExeptionDB.pl ./WordNet-2.0-Exceptions ./smart_common_words.txt ./WordNet-2.0.exc.db
I get stuck by this error for two days,,,
And I have also tried the pyrouge from andersjo, but its API is different. How can I tackle this problem? What's going on here? I have tried to delete the file but cannot find it there.