pyrouge install and test

pyrouge is a python wrapper for the original perl script. TO use it, you need do the following steps:

1. Get the tools/ROUGE-1.5.5

git clone https://github.com/andersjo/pyrouge.git

2. Install pyrouge package

either

pip install pyrouge

or install from local

https://github.com/bheinzerling/pyrouge.git

3. Set path to ROUGE-1.5.5 (the git folder in step 1)

pyrouge_set_rouge_path /absolute/path/to/ROUGE-1.5.5/

4. Possible errors

Cannot open exception db file for reading: data/WordNet-2.0.exc.db

You can run the following:

cd /home/yzhao/soft/ROUGE-1.5.5/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
Illegal division by zero at ./ROUGE-1.5.5.pl line 2450.

That could be the txt contains tokens not allowed such as "<", "<unk>".

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容