我想用ROUGE分析我的摘要。 到目前为止,我已经编写了一个perl脚本来在命令行上运行ROUGE,这是我迄今为止所做的:
#!/usr/bin/perl use warnings; use Cwd; $curdir=getcwd; $ROUGE="/ROUGE-1.5.5.pl"; chdir("sample-test"); $cmd="$ROUGE -e /data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a DUC2002ROUGE.in.26.spl.xm> /sample-output/salam.out"; print $cmd,"\n"; system($cmd); chdir($curdir);但是我得到这个错误:
系统找不到指定的路径
I want to analyse my summaries using ROUGE. So far i have written a perl script to run ROUGE on the command line, this is what I have so far:
#!/usr/bin/perl use warnings; use Cwd; $curdir=getcwd; $ROUGE="/ROUGE-1.5.5.pl"; chdir("sample-test"); $cmd="$ROUGE -e /data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a DUC2002ROUGE.in.26.spl.xm> /sample-output/salam.out"; print $cmd,"\n"; system($cmd); chdir($curdir);However I get this error:
the system can't find the specified path
最满意答案
我想你想在windows中使用rouge来评估夏令时。我建议你使用linux的ubuntu版本并安装rouge并使用这个命令来获得你的输出:
我的意思是将这个文件保存为一个perl文件并在linux终端中执行这个文件
#!/usr/bin/perl -w use Cwd; $curdir=getcwd; $ROUGE="../ROUGE-1.5.5.pl"; chdir("sample-test"); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -3 HM -z SIMPLE DUC2002-BE-F.in.26.lst 26 > ../sample-output/DUC2002-BE-F.in.26.lst.out"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -3 HM DUC2002-BE-F.in.26.simple.xml 26 > ../sample-output/DUC2002-BE-F.in.26.simple.out"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -3 HM -z SIMPLE DUC2002-BE-L.in.26.lst 26 > ../sample-output/DUC2002-BE-L.in.26.lst.out"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -3 HM DUC2002-BE-L.in.26.simple.xml 26 > ../sample-output/DUC2002-BE-L.in.26.simple.out"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -n 4 -z SPL DUC2002-ROUGE.in.26.spl.lst 26 > ../sample-output/DUC2002-ROUGE.in.26.spl.lst.out"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -n 4 DUC2002-ROUGE.in.26.spl.xml 26 > ../sample-output/DUC2002-ROUGE.in.26.spl.out"; print $cmd,"\n"; system($cmd); chdir($curdir);I think you want to evaluate the summerization using rouge in windows.I recommend you to use an ubuntu version of linux and install the rouge and use this command to get your output:
I mean save this file as a perl file and execute this file in terminal of linux
#!/usr/bin/perl -w use Cwd; $curdir=getcwd; $ROUGE="../ROUGE-1.5.5.pl"; chdir("sample-test"); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -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"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -3 HM -z SIMPLE DUC2002-BE-F.in.26.lst 26 > ../sample-output/DUC2002-BE-F.in.26.lst.out"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -3 HM DUC2002-BE-F.in.26.simple.xml 26 > ../sample-output/DUC2002-BE-F.in.26.simple.out"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -3 HM -z SIMPLE DUC2002-BE-L.in.26.lst 26 > ../sample-output/DUC2002-BE-L.in.26.lst.out"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -3 HM DUC2002-BE-L.in.26.simple.xml 26 > ../sample-output/DUC2002-BE-L.in.26.simple.out"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -n 4 -z SPL DUC2002-ROUGE.in.26.spl.lst 26 > ../sample-output/DUC2002-ROUGE.in.26.spl.lst.out"; print $cmd,"\n"; system($cmd); $cmd="$ROUGE -e ../data -n 4 DUC2002-ROUGE.in.26.spl.xml 26 > ../sample-output/DUC2002-ROUGE.in.26.spl.out"; print $cmd,"\n"; system($cmd); chdir($curdir);更多推荐
ROUGE,perl,$cmd,$curdir,电脑培训,计算机培训,IT培训"/> <meta name="descr
发布评论