参考链接
相关安装包在第一个链接中
https://www.jianshu.com/p/672c1d8658ce
https://blog.csdn.net/weixin_42018581/article/details/102688181
1、
# 查看perl版本
!perl -v
>>v5.26.1
2、
# 安装XML-Parser
cd XML-Parser-2.44
!sudo perl Makefile.PL
!sudo make
!sudo make test # Result为PASS意思是成功
!sudo make install
3、
# 安装XML-RegExp
cd XML-RegExp-0.04
!sudo perl Makefile.PL
!sudo make
!sudo make test
!sudo make install
4、
# 安装两个package
!sudo apt-get install libwww-perl
!sudo apt-get install libxml-perl
5、
# 安装XML-DOM
cd XML-DOM-1.46
!sudo perl Makefile.PL
!sudo make
!sudo make test
!sudo make install
6、
# 安装DB_File
# 先安装这个依赖库
!sudo apt-get install libdb-dev
cd DB_File-1.835
!sudo perl Makefile.PL
!sudo make
!sudo make test # 此时会报错,不用管
!sudo make install
7、
!export ROUGE_EVAL_HOME="$ROUGE_EVAL_HOME:/content/drive/MyDrive/your_path/RELEASE-1.5.5/data"
# 使用which perl检查结果与ROUGE-1.5.5.pl中的内容是否一致
!which perl
!perl runROUGE-test.pl
# 若提示权限不足,可使用以下命令更改文件权限
# /ROUGE-1.5.5.pl: Permission denied
!chmod 777 /content/drive/MyDrive/RE_model/ROUGE/RELEASE-1.5.5/ROUGE-1.5.5.pl
"
../ROUGE-1.5.5.pl -e ../data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a ROUGE-test.xml > ../sample-output/ROUGE-test-c95-2-1-U-r1000-n4-w1.2-a.out
../ROUGE-1.5.5.pl -e ../data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a -m ROUGE-test.xml > ../sample-output/ROUGE-test-c95-2-1-U-r1000-n4-w1.2-a-m.out
../ROUGE-1.5.5.pl -e ../data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a -m -s ROUGE-test.xml > ../sample-output/ROUGE-test-c95-2-1-U-r1000-n4-w1.2-a-m-s.out
../ROUGE-1.5.5.pl -e ../data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -l 10 -a ROUGE-test.xml > ../sample-output/ROUGE-test-c95-2-1-U-r1000-n4-w1.2-l10-a.out
../ROUGE-1.5.5.pl -e ../data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -l 10 -a -m ROUGE-test.xml > ../sample-output/ROUGE-test-c95-2-1-U-r1000-n4-w1.2-l10-a-m.out
../ROUGE-1.5.5.pl -e ../data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -l 10 -a -m -s ROUGE-test.xml > ../sample-output/ROUGE-test-c95-2-1-U-r1000-n4-w1.2-l10-a-m-s.out
../ROUGE-1.5.5.pl -e ../data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -b 75 -a ROUGE-test.xml > ../sample-output/ROUGE-test-c95-2-1-U-r1000-n4-w1.2-b75-a.out
../ROUGE-1.5.5.pl -e ../data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -b 75 -a -m ROUGE-test.xml > ../sample-output/ROUGE-test-c95-2-1-U-r1000-n4-w1.2-b75-a-m.out
../ROUGE-1.5.5.pl -e ../data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -b 75 -a -m -s ROUGE-test.xml > ../sample-output/ROUGE-test-c95-2-1-U-r1000-n4-w1.2-b75-a-m-s.out
../ROUGE-1.5.5.pl -e ../data -3 HM -z SIMPLE DUC2002-BE-F.in.26.lst 26 > ../sample-output/DUC2002-BE-F.in.26.lst.out
../ROUGE-1.5.5.pl -e ../data -3 HM DUC2002-BE-F.in.26.simple.xml 26 > ../sample-output/DUC2002-BE-F.in.26.simple.out
../ROUGE-1.5.5.pl -e ../data -3 HM -z SIMPLE DUC2002-BE-L.in.26.lst 26 > ../sample-output/DUC2002-BE-L.in.26.lst.out
../ROUGE-1.5.5.pl -e ../data -3 HM DUC2002-BE-L.in.26.simple.xml 26 > ../sample-output/DUC2002-BE-L.in.26.simple.out
../ROUGE-1.5.5.pl -e ../data -n 4 -z SPL DUC2002-ROUGE.in.26.spl.lst 26 > ../sample-output/DUC2002-ROUGE.in.26.spl.lst.out
../ROUGE-1.5.5.pl -e ../data -n 4 DUC2002-ROUGE.in.26.spl.xml 26 > ../sample-output/DUC2002-ROUGE.in.26.spl.out
"
8、
# 下载pyrouge
!git clone https://github.com/bheinzerling/pyrouge.git
!python setup.py install
!pyrouge_set_rouge_path /content/drive/MyDrive/your_path/RELEASE-1.5.5
"
2022-05-03 08:02:42,800 [MainThread ] [INFO ] Set ROUGE home directory to /content/drive/MyDrive/play/rouge/RELEASE-1.5.5.
"
9、
# 做测试,成功
!python -m pyrouge.test
"
Ran 11 tests in 10.269s
OK
"