Who to complain to about this terrible package???? Its official website was down, its bugs and exceptions are famous, and its python wrapper code has errors...But everyone use it for summarization tasks. Not cool at all.
忍不住吐槽,Rouge,一个连官网都关闭了的,纯靠遗产继承的,超级史诗级烂尾工程,还那么多人用.....
pyrouge安装了之后报错居然改代码搞定的,你特么没弄好就别发布行不行?
Install Rouge and Pyrouge
Step 1: Create a new conda virtual env
conda create -n py27env python=2.7 pip
source activate py27env
# use " source deactivate" to deactivate the env
Step 2: Install pyrouge by conda from 3rd party
conda install -c auto pyrouge
Step 3: Download ROUGE-1.5.5 from its closed website by using a time machine (ask Einstein or go to Github), then copy ROUGE-1.5.5 to ~/rouge_path
cp RELEASE-1.5.5 ~/rouge/
Step 4: Set ROUGE path for pyrouge
pyrouge_set_rouge_path ~/rouge/RELEASE-1.5.5
Step 5: Install plugins for ROUGE-1.5.5
sudo cpan App::cpanminus
sudo cpanm XML::DOM
Step 6: Deal with Wordnet exceptions for ROUGE-1.5.5 (f**k)
cd ~/rouge/RELEASE-1.5.5/data/WordNet-2.0-Exceptions/
./buildExeptionDB.pl . exc WordNet-2.0.exc.db
cd ../
ln -s WordNet-2.0-Exceptions/WordNet-2.0.exc.db WordNet-2.0.exc.db
Step 7: Deal with test code errors for pyrouge (f**k AGAIN!)
In Rouge155_test.py file, you should modify two lines (refhttps://stackoverflow.com/a/41382391):
vi ~/.anaconda3/envs/py27env/lib/python2.7/site-packages/pyrouge/tests/Rouge155_test.py
modify
"pyrouge_evaluate_plain_text_files.py -m {} -s {} -sfp "
to
"pyrouge_evaluate_plain_text_files -m {} -s {} -sfp "
And, modify
"pyrouge_write_config_file.py -m {m} -s {s} "
to
"pyrouge_write_config_file -m {m} -s {s} "
Step 8: Run test until "OK" appears.
>python -m pyrouge.test
Ran 10 tests in 10.583s
OK
Done.

这篇博客详细记录了在Linux上使用conda创建Python 2.7虚拟环境,并安装问题重重的Rouge和Pyrouge的过程,包括从废弃网站获取ROUGE-1.5.5,设置路径,安装插件,处理Wordnet异常和修复测试代码错误等步骤。
8267

被折叠的 条评论
为什么被折叠?



