安装pyrouge时出现AssertionError [英] AssertionError when installing pyrouge
问题描述
粉尘:0.1.3
rouge :从[here] [1]下载,因为 http ://www.berouge.com/Pages/default.aspx 不可访问.
rouge: downloaded from [here][1] since http://www.berouge.com/Pages/default.aspx is not accessable.
我已经安装了XML :: DOM并设置了胭脂路径.而且我还尝试了安装Pyrouge时出错的建议.但是,这里仍然存在一些断言错误.有什么建议可以解决吗?
I have installed XML::DOM and set the rouge path. And I've also tried suggestion from Errors installing Pyrouge. However there are still several assertion error here. Any suggestion to work it out?
======================================================================
FAIL: test_config_file (pyrouge.tests.Rouge155_test.PyrougeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/amon/anaconda2/lib/python2.7/site-packages/pyrouge/tests/Rouge155_test.py", line 147, in test_config_file
add_data_path("ROUGE-test_11.xml")))
AssertionError: False is not true
======================================================================
FAIL: test_evaluation (pyrouge.tests.Rouge155_test.PyrougeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/amon/anaconda2/lib/python2.7/site-packages/pyrouge/tests/Rouge155_test.py", line 164, in test_evaluation
self.assertEqual(pyrouge_output, orig_rouge_output)
AssertionError: u'---------------------------------------------\n11 ROUGE-1 Average_R: 0.22651 ( [truncated]... != u'---------------------------------------------\n11 ROUGE-1 Average_R: 0.77650 ( [truncated]...
Diff is 5949 characters long. Set self.maxDiff to None to see it.
======================================================================
FAIL: test_rouge_for_plain_text (pyrouge.tests.Rouge155_test.PyrougeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/amon/anaconda2/lib/python2.7/site-packages/pyrouge/tests/Rouge155_test.py", line 183, in test_rouge_for_plain_text
self.assertEqual(pyrouge_output, orig_rouge_output)
AssertionError: u'---------------------------------------------\n1 ROUGE-1 Average_R: 0.40054 (9 [truncated]... != u'---------------------------------------------\n1 ROUGE-1 Average_R: 0.61336 (9 [truncated]...
Diff is 6253 characters long. Set self.maxDiff to None to see it.
======================================================================
FAIL: test_write_config (pyrouge.tests.Rouge155_test.PyrougeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/amon/anaconda2/lib/python2.7/site-packages/pyrouge/tests/Rouge155_test.py", line 200, in test_write_config
self.assertTrue(xml_equal(config_file, target_xml))
AssertionError: False is not true
----------------------------------------------------------------------
Ran 11 tests in 9.499s
推荐答案
来自bheinzerling(pyrouge的作者之一)在 https://github.com/bheinzerling/pyrouge/issues/6 :
From bheinzerling (one of the authors of pyrouge) on https://github.com/bheinzerling/pyrouge/issues/6:
测试不是最新的,但应该立即修复.
The tests were not up-to-date, but should be fixed now.
您可以通过以下方式获取最新版本:
You can get the latest version with:
git clone https://github.com/bheinzerling/pyrouge
cd pyrouge
python setup.py install
python -m pyrouge.test
这篇关于安装pyrouge时出现AssertionError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!