在我在 Stackoverflow 上发布的上一个问题中,我询问了 Pyrouge 的安装。收到答案后,我申请了。从pypi安装步骤,我做到了
pip install pyrouge
然后(这里是我替换 pypi 原始步骤 2 的地方,
pyrouge_set_rouge_path.py /absolute/path/to/ROUGE-1.5.5/directory
与我从stackoverflow收到的答案):
set pyrouge_set_rouge_path=C:\rouge
然后,我运行以下命令以确保它正确安装:
python -m pyrouge.test
我应该收到以下输出:
Ran 10 tests in 3.753s
OK
但是得到了以下输出:
Ran 10 tests in 0.034s
FAILED (erros=10)
除此之外,我每次测试尝试都收到一个错误。
Error1: test_config_file (pyrouge.tests.Rouge155_test.PyrougeTest)
Error2: test_convert_summaries (pyrouge.tests.Rouge155_test.PyrougeTest)
Error3: test_evaluation (pyrouge.tests.Rouge155_test.PyrougeTest)
Error4: test_options (pyrouge.tests.Rouge155_test.PyrougeTest)
Error5: test_paths (pyrouge.tests.Rouge155_test.PyrougeTest)
Error6: test_rouge_for_plain_text (pyrouge.tests.Rouge155_test.PyrougeTest)
Error7: test_text_conversion (pyrouge.tests.Rouge155_test.PyrougeTest)
Error8: test_write_config (pyrouge.tests.Rouge155_test.PyrougeTest)
Error9: test_wrong_model_pattern (pyrouge.tests.Rouge155_test.PyrougeTest)
Error10: test_wrong_system_pattern (pyrouge.tests.Rouge155_test.PyrougeTest)
以下是详细的第一个和最后一个错误:
第一个错误:“””
EEEEEEEEEE
======================================================================
ERROR: test_config_file (pyrouge.tests.Rouge155_test.PyrougeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pyrouge\tests\Rouge155_test.py", line 138,
in test_config_file
rouge = Rouge155()
File "C:\Python27\lib\site-packages\pyrouge\Rouge155.py", line 88, in __init__
self.__set_rouge_dir(rouge_dir)
File "C:\Python27\lib\site-packages\pyrouge\Rouge155.py", line 402, in __set_r
ouge_dir
self._home_dir = self.__get_rouge_home_dir_from_settings()
File "C:\Python27\lib\site-packages\pyrouge\Rouge155.py", line 416, in __get_r
ouge_home_dir_from_settings
with open(self._settings_file) as f:
IOError: [Errno 2] No such file or directory: u'C:\\Users\\IQ\\AppData\\Roaming\
\pyrouge\\settings.ini'
"""
上次错误:“””
ERROR: test_wrong_system_pattern (pyrouge.tests.Rouge155_test.PyrougeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pyrouge\tests\Rouge155_test.py", line 59,
in test_wrong_system_pattern
rouge = Rouge155()
File "C:\Python27\lib\site-packages\pyrouge\Rouge155.py", line 88, in __init__
self.__set_rouge_dir(rouge_dir)
File "C:\Python27\lib\site-packages\pyrouge\Rouge155.py", line 402, in __set_r
ouge_dir
self._home_dir = self.__get_rouge_home_dir_from_settings()
File "C:\Python27\lib\site-packages\pyrouge\Rouge155.py", line 416, in __get_r
ouge_home_dir_from_settings
with open(self._settings_file) as f:
IOError: [Errno 2] No such file or directory: u'C:\\Users\\IQ\\AppData\\Roaming\
\pyrouge\\settings.ini'
"""
我打开了目录:C:\Users\IQ\AppData\Roaming\pyrouge\,但它是空的。我想知道这是什么问题,以及如何解决它。
谢谢你。