赞
踩
《原始论文:Rouge: A package for automatic evaluation of summaries》
Rouge(Recall-Oriented Understudy for Gisting Evaluation),是评估自动文摘以及机器翻译的一组指标。它通过将自动生成的摘要或翻译与一组参考摘要(通常是人工生成的)进行比较计算,得出相应的分值,以衡量自动生成的摘要或翻译与参考摘要之间的“相似度”。
ROUGE 指标的全称是 (Recall-Oriented Understudy for Gisting Evaluation),主要是基于召回率 (recall) 的。ROUGE 是一种常用的机器翻译和文章摘要评价指标,由 Chin-Yew Lin 提出,其在论文中提出了 4 种 ROUGE 方法:
ROUGE-N: 在 N-gram 上计算召回率
ROUGE-L: 考虑了机器译文和参考译文之间的最长公共子序列
ROUGE-W: 改进了ROUGE-L,用加权的方法计算最长公共子序列
分母是参考摘要(人工摘要/标准答案)中n-gram的总数量,分子是模型生成的摘要和参考摘要共有的n-gram的个数,即召回率(Recall)。
Rouge-N: 是对应的Rouge-1 : 1-gram, Rouge-2: 2-gram,Rouge-3: 3-gram。
自动摘要 Y Y Y(一般是模型生成的):
the cat was found under the bed
参考摘要, X X X(gold standard ,人工生成的):
the cat was under the bed
则模型生成的summary的1-gram、2-gram如下,N-gram以此类推:
# | 1-gram | reference 1-gram | 2-gram | reference 2-gram |
---|---|---|---|---|
1 | the | the | the cat | the cat |
2 | cat | cat | cat was | cat was |
3 | was | was | was found | was under |
4 | found | under | found under | under the |
5 | under | the | under the | the bed |
6 | the | bed | the bed | |
7 | bed | |||
count | 7 | 6 | 6 | 5 |
Rouge-1 ( X , Y ) = 6 6 = 1.0 \text{Rouge-1}(X,Y) = \cfrac66=1.0 Rouge-1(X,Y)=66=1.0:分子是待评测摘要和参考摘要都出现的1-gram的个数,分子是参考摘要的1-gram个数。(其实分母也可以是待评测摘要的,但是在精确率和召回率之间,我们更关心的是召回率Recall,同时这也和上面ROUGN-N的公式相同)
Rouge-2 ( X , Y ) = 4 5 = 0.8 \text{Rouge-2}(X,Y) = \cfrac45=0.8 Rouge-2(X,Y)=54=0.8
Rouge-N 优点:直观,简洁,能反映词序。
Rouge-N 缺点:区分度不高,且当N>3时,ROUGE-N值通常很小。
应用场景:
L即是LCS(longest common subsequence,最长公共子序列)的首字母,因为Rouge-L使用了最长公共子序列。Rouge-L计算方式如下图:
其中:
在DUC中, β β β 被设置为一个很大的数,所以Rouge-L几乎只考虑 R l c s R_{lcs} Rlcs,与上面所说的一般只考虑召回率对应。
优点:使用LCS的一个优点是它不需要连续匹配,而且反映了句子级词序的顺序匹配。由于它自动包含最长的顺序通用n-gram,因此您不需要预定义的n-gram长度。
缺点:只计算一个最长子序列,最终的值忽略了其他备选的最长子序列及较短子序列的影响。
应用场景:单文档摘要;短摘要评估。
ROUGE-W 是 ROUGE-L 的改进版,考虑下面的例子,X表示参考译文,而Y1,Y2表示两种机器译文。
在这个例子中,明显 Y1的翻译质量更高,因为 Y1 有更多连续匹配的翻译。但是采用 ROUGE-L 计算得到的分数确实一样的,即 ROUGE-L(X, Y1)=ROUGE-L(X, Y2)。
因此作者提出了一种加权最长公共子序列方法 (WLCS),给连续翻译正确的更高的分数,具体做法可以阅读原论文《ROUGE: A Package for Automatic Evaluation of Summaries》。
即使用了skip-grams,在参考摘要和待评测摘要进行匹配时,不要求gram之间必须是连续的,可以“跳过”几个单词,比如skip-bigram,在产生grams时,允许最多跳过两个词。比如“cat in the hat”的 skip-bigrams 就是 “cat in, cat the, cat hat, in the, in hat, the hat”.
优点:考虑了所有按词序排列的词对,比n-gram模型更深入反映句子级词序。
缺点:若不设定最大跳跃词数会出现很多无意义词对。若设定最大跳跃词数,需要指定最大跳跃词数的值。
应用场景:单文档摘要;ROUGE-S4,ROUGE-S9: 多文档摘要(去停用词条件);
自动摘要的评价一般要用到外部工具,而现在的外部评价标准一般是使用pyrouge,因此需要安装pyrouge工具。因为不想在Ubuntu安装,所以在Windows10下安装了。
环境:Windows10、python3.6 、Anaconda
ActivePerl-5.10.msi版本及以上
git clone https://github.com/andersjo/pyrouge.git
pyrouge_set_rouge_path C:/Program_Files_AI/pyrouge/tools/ROUGE-1.5.5
自己找到pyrouge的tools目录下的ROUGE-1.5.5就行了
pip install pyrouge
这一步比较重要,昨天因为少了这个文件就报错了。
由于下载pyrouge时没有自动生成settings.ini文件(我下载的时候没有,可以去目录下查看,我的目录:C:\Users\Admin\AppData\Roaming\pyrouge)但是不能自己手动的方式新建一个.ini文件,需要特定的方法生成:进入到python环境的Scripts文件下(我的目录:C:\Program_Files_AI\Anaconda3531\Scripts),在此目录下打开命令行终端,并执行:
pyrouge_set_rouge_path C:/Program_Files_AI/pyrouge/tools/ROUGE-1.5.5
pyrouge的安装这里引用了一位知友的配置方案,这里直接附上作者写的解决方案:https://zhuanlan.zhihu.com/p/45548244【WHX:此方案有问题】
from pprint import pprint
from pyrouge import Rouge155
r = Rouge155()
r.system_dir = '参考摘要的路径'# 'path/to/system_summaries'
r.model_dir = '生成摘要的路径' #'path/to/model_summaries'
r.system_filename_pattern = '(\d+)_decoded.txt' # 这个名字根据自己摘要命令,一般是多个
r.model_filename_pattern = '#ID#_reference.txt' # 所以用正则表达式来匹配了数字0001.txt这种
score = r.convert_and_evaluate()
# pprint(score)
output_dict = r.output_to_dict(score)
下面是terminal输出的内容,使用成功了(✌✌✌)
--------------------------------------------- 1 ROUGE-1 Average_R: 0.33506 (95%-conf.int. 0.32009 - 0.34979) 1 ROUGE-1 Average_P: 0.28501 (95%-conf.int. 0.27393 - 0.29769) 1 ROUGE-1 Average_F: 0.30094 (95%-conf.int. 0.28892 - 0.31366) --------------------------------------------- 1 ROUGE-2 Average_R: 0.12008 (95%-conf.int. 0.10805 - 0.13171) 1 ROUGE-2 Average_P: 0.09973 (95%-conf.int. 0.09040 - 0.10979) 1 ROUGE-2 Average_F: 0.10636 (95%-conf.int. 0.09634 - 0.11692) --------------------------------------------- 1 ROUGE-3 Average_R: 0.06345 (95%-conf.int. 0.05404 - 0.07291) 1 ROUGE-3 Average_P: 0.05240 (95%-conf.int. 0.04526 - 0.06068) 1 ROUGE-3 Average_F: 0.05605 (95%-conf.int. 0.04837 - 0.06448) --------------------------------------------- 1 ROUGE-4 Average_R: 0.03911 (95%-conf.int. 0.03146 - 0.04744) 1 ROUGE-4 Average_P: 0.03206 (95%-conf.int. 0.02608 - 0.03892) 1 ROUGE-4 Average_F: 0.03440 (95%-conf.int. 0.02790 - 0.04180) --------------------------------------------- 1 ROUGE-L Average_R: 0.29892 (95%-conf.int. 0.28492 - 0.31309) 1 ROUGE-L Average_P: 0.25305 (95%-conf.int. 0.24256 - 0.26494) 1 ROUGE-L Average_F: 0.26776 (95%-conf.int. 0.25675 - 0.28008) --------------------------------------------- 1 ROUGE-W-1.2 Average_R: 0.14460 (95%-conf.int. 0.13699 - 0.15203) 1 ROUGE-W-1.2 Average_P: 0.19979 (95%-conf.int. 0.19134 - 0.20945) 1 ROUGE-W-1.2 Average_F: 0.16309 (95%-conf.int. 0.15549 - 0.17104) --------------------------------------------- 1 ROUGE-S* Average_R: 0.10324 (95%-conf.int. 0.09255 - 0.11410) 1 ROUGE-S* Average_P: 0.07286 (95%-conf.int. 0.06614 - 0.08038) 1 ROUGE-S* Average_F: 0.07842 (95%-conf.int. 0.07090 - 0.08636) --------------------------------------------- 1 ROUGE-SU* Average_R: 0.11811 (95%-conf.int. 0.10706 - 0.12921) 1 ROUGE-SU* Average_P: 0.08374 (95%-conf.int. 0.07696 - 0.09151) 1 ROUGE-SU* Average_F: 0.09029 (95%-conf.int. 0.08267 - 0.09834)
完全按照上面那位朋友的安装方案安装了pyrouge之后,开始使用之前还是遇到了一些问题,首先第一个问题是要评测的参考摘要和生成摘要都是多个的,这里用到的命名格式是(如果仅仅是单个句子的话,其实没啥意义,这里就不记录了):ps.名称根据你自己的模型生成的格式来修改上面的代码。
# 参考摘要的命名格式
0001_reference.txt
0002_reference.txt
......
1234_reference.txt
# 生成摘要的命名格式
0001_decoded.txt
0002_decoded.txt
......
1234_decoded.txt
最初安装pyrouge:
pip install pyrouge
出现了下面的错误:
FileNotFoundError: [Errno 2] No such file or directory: 'yourpath/.pyrouge/settings.ini'
解决方法
git clone https://github.com/andersjo/pyrouge.git
pyrouge_set_rouge_path C:/Program_Files_AI/pyrouge/tools/ROUGE-1.5.5
自己找到pyrouge的tools目录下的ROUGE-1.5.5就行了
这个问题真的很头疼,我之前在网上找了很久解决方案都没有什么有效的方法,结果仔细阅读报错的上面信息我发现了这么一句话:(划重点)
2020-07-24 11:00:48,050 [MainThread ] [INFO ] Running ROUGE with command G:/0/pyrouge/tools/ROUGE-1.5.5\ROUGE-1.5.5.pl -e G:/0/pyrouge/tools/ROUGE-1.5.5\data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a -m C:\Users\dell\AppData\Local\Temp\tmpzk7p5zuc\rouge_conf.xml
自己的:
2022-02-19 14:49:13,225 [MainThread ] [INFO ] Running ROUGE with command C:/Program_Files_AI/pyrouge/tools/ROUGE-1.5.5\ROUGE-1.5.5.pl -e C:/Program_Files_AI/pyrouge/tools/ROUGE-1.5.5\data -c 95 -m -r 1000 -n 2 -a ../temp\tmpr4ts8ri4\rouge_conf.xml
啊喂,下次报错信息看仔细点啊!!!!!!
它的意思是让我执行这个命令:G:/0/pyrouge/tools/ROUGE-1.5.5\ROUGE-1.5.5.pl -e G:/0/pyrouge/tools/ROUGE-1.5.5\data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a -m C:\Users\dell\AppData\Local\Temp\tmpzk7p5zuc\rouge_conf.xml
跟着指示操作,我又执行了上述的命令(报错信息里面有的,根据自己的配置路径来)。然后吧,果然事情没这么简单,这个命令看着就很奇怪,不像是python的命令,又是各种查,发现这个其实是执行perl的命令,因此在执行前需要加上perl,所以最终得到rouge得分的执行命令是:(划重点:路径是根据自己的配置信息来的,不过我的操作是先执行了python rouge.py 然后用得到的报错信息生成下面的命令)
perl G:/0/pyrouge/tools/ROUGE-1.5.5\ROUGE-1.5.5.pl -e G:/0/pyrouge/tools/ROUGE-1.5.5\data -c 95 -2 -1 -U -r 1000 -n 4 -w 1.2 -a -m C:\Users\dell\AppData\Local\Temp\tmpzk7p5zuc\rouge_conf.xml
打开 C:\Anaconda\envs\py35\Lib\site-packages\pyrouge\Rouge155.py (pyrouge的安装目录),
找到函数(319行):
def evaluate(self, system_id=1, rouge_args=None)
在
self.log.info(
"Running ROUGE with command {}".format(" ".join(command)))
命令上一行添加:
command.insert(0, 'perl ')
prel后要有一个空格。
就在我以为马上就可以出结果的时候出现了下面的问题,尽情欣赏迷惑bug大赏[哭泣.jpg]
报错信息是:
Can’t locate DB_File.pm in @INC (you may need to install the DB_File module) (@INC contains: G:/0/pyrouge/tools/ROUGE-1.5.5 C:/Perl64/site/lib C:/Perl64/lib) at G:/0/pyrouge/tools/ROUGE-1.5.5\ROUGE-1.5.5.pl line 178.
然后因为pyrouge开发的就不是windows下用的,所以会出现这样的问题。然后就是根据它的提示,找到对应目录下这个ROUGE-1.5.5.pl文件,找到这个文件的178行(左右)把下面的内容注释掉,善用搜索功能搜索关键词”DB_File”。
注释了上述内容之后再去运行一下就大功告成了!
[2022-02-19 16:08:31,329 INFO] Loading checkpoint from ../models/BertSumExtAbs/model_step_8000.pt Namespace(accum_count=1, alpha=0.6, batch_size=60, beam_size=5, bert_data_path='D:\\NLP_Data\\bert_data_cnndm_final', beta1=0.9, beta2=0.999, block_trigram=True, dec_dropout=0.2, dec_ff_size=2048, dec_heads=8, dec_hidden_size=768, dec_layers=6, enc_dropout=0.2, enc_ff_size=512, enc_hidden_size=512, enc_layers=6, encoder='bert', ext_dropout=0.2, ext_ff_size=2048, ext_heads=8, ext_hidden_size=768, ext_layers=2, finetune_bert=True, generator_shard_size=32, gpu_ranks=[0], label_smoothing=0.1, large=False, load_from_extractive='', log_file='../logs/cnndm.log', lr=1, lr_bert=0.002, lr_dec=0.002, max_grad_norm=0, max_length=150, max_ndocs_in_batch=6, max_pos=512, max_tgt_len=140, min_length=15, mode='test', model_path='../models/', optim='adam', param_init=0, param_init_glorot=True, recall_eval=False, report_every=1, report_rouge=True, result_path='../results/cnndm', save_checkpoint_steps=5, seed=666, sep_optim=False, share_emb=False, task='abs', temp_dir='../temp', test_all=False, test_batch_size=800, test_from='../models/BertSumExtAbs/model_step_8000.pt', test_start_from=-1, text_src='', text_tgt='', train_from='', train_steps=1000, use_bert_emb=False, use_interval=True, visible_gpus='', warmup_steps=8000, warmup_steps_bert=8000, warmup_steps_dec=8000, world_size=1) [2022-02-19 16:08:33,005 INFO] https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-config.json not found in cache or force_download set to True, downloading to C:\Users\Admin\AppData\Local\Temp\tmp8tchjvlc 100%|██████████| 433/433 [00:00<00:00, 422356.66B/s] [2022-02-19 16:08:33,789 INFO] copying C:\Users\Admin\AppData\Local\Temp\tmp8tchjvlc to cache at ../temp\4dad0251492946e18ac39290fcfe91b89d370fee250efe9521476438fe8ca185.7156163d5fdc189c3016baca0775ffce230789d7fa2a42ef516483e4ca884517 [2022-02-19 16:08:33,789 INFO] creating metadata file for ../temp\4dad0251492946e18ac39290fcfe91b89d370fee250efe9521476438fe8ca185.7156163d5fdc189c3016baca0775ffce230789d7fa2a42ef516483e4ca884517 [2022-02-19 16:08:33,790 INFO] removing temp file C:\Users\Admin\AppData\Local\Temp\tmp8tchjvlc [2022-02-19 16:08:33,790 INFO] loading configuration file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-config.json from cache at ../temp\4dad0251492946e18ac39290fcfe91b89d370fee250efe9521476438fe8ca185.7156163d5fdc189c3016baca0775ffce230789d7fa2a42ef516483e4ca884517 [2022-02-19 16:08:33,791 INFO] Model config { "architectures": [ "BertForMaskedLM" ], "attention_probs_dropout_prob": 0.1, "finetuning_task": null, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-12, "max_position_embeddings": 512, "model_type": "bert", "num_attention_heads": 12, "num_hidden_layers": 12, "num_labels": 2, "output_attentions": false, "output_hidden_states": false, "pad_token_id": 0, "pruned_heads": {}, "torchscript": false, "type_vocab_size": 2, "vocab_size": 30522 } [2022-02-19 16:08:34,575 INFO] https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-pytorch_model.bin not found in cache or force_download set to True, downloading to C:\Users\Admin\AppData\Local\Temp\tmpcq8u3rn6 100%|██████████| 440473133/440473133 [02:48<00:00, 2607604.60B/s] [2022-02-19 16:11:24,312 INFO] copying C:\Users\Admin\AppData\Local\Temp\tmpcq8u3rn6 to cache at ../temp\aa1ef1aede4482d0dbcd4d52baad8ae300e60902e88fcb0bebdec09afd232066.36ca03ab34a1a5d5fa7bc3d03d55c4fa650fed07220e2eeebc06ce58d0e9a157 [2022-02-19 16:11:24,870 INFO] creating metadata file for ../temp\aa1ef1aede4482d0dbcd4d52baad8ae300e60902e88fcb0bebdec09afd232066.36ca03ab34a1a5d5fa7bc3d03d55c4fa650fed07220e2eeebc06ce58d0e9a157 [2022-02-19 16:11:24,871 INFO] removing temp file C:\Users\Admin\AppData\Local\Temp\tmpcq8u3rn6 [2022-02-19 16:11:24,902 INFO] loading weights file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-pytorch_model.bin from cache at ../temp\aa1ef1aede4482d0dbcd4d52baad8ae300e60902e88fcb0bebdec09afd232066.36ca03ab34a1a5d5fa7bc3d03d55c4fa650fed07220e2eeebc06ce58d0e9a157 [2022-02-19 16:11:30,772 INFO] Loading test dataset from D:\NLP_Data\bert_data_cnndm_final\test.0.bert.pt, number of examples: 2001 [2022-02-19 16:11:31,555 INFO] https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt not found in cache or force_download set to True, downloading to C:\Users\Admin\AppData\Local\Temp\tmp11w7z2fx 100%|██████████| 231508/231508 [00:00<00:00, 663580.21B/s] [2022-02-19 16:11:32,683 INFO] copying C:\Users\Admin\AppData\Local\Temp\tmp11w7z2fx to cache at ../temp\26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084 [2022-02-19 16:11:32,684 INFO] creating metadata file for ../temp\26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084 [2022-02-19 16:11:32,684 INFO] removing temp file C:\Users\Admin\AppData\Local\Temp\tmp11w7z2fx [2022-02-19 16:11:32,684 INFO] loading file https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt from cache at ../temp\26bc1ad6c0ac742e9b52263248f6d0f00068293b33709fae12320c0e35ccfbbb.542ce4285a40d23a559526243235df47c5f75c197f04f37d1a0c124c32c9a084 [2022-02-19 16:40:18,007 INFO] Loading test dataset from D:\NLP_Data\bert_data_cnndm_final\test.1.bert.pt, number of examples: 2001 [2022-02-19 17:10:21,805 INFO] Loading test dataset from D:\NLP_Data\bert_data_cnndm_final\test.2.bert.pt, number of examples: 2001 [2022-02-19 17:39:47,030 INFO] Loading test dataset from D:\NLP_Data\bert_data_cnndm_final\test.3.bert.pt, number of examples: 2001 [2022-02-19 18:09:42,677 INFO] Loading test dataset from D:\NLP_Data\bert_data_cnndm_final\test.4.bert.pt, number of examples: 2000 [2022-02-19 18:39:59,282 INFO] Loading test dataset from D:\NLP_Data\bert_data_cnndm_final\test.5.bert.pt, number of examples: 1485 [2022-02-19 19:01:43,975 INFO] Calculating Rouge 11489 11489 2022-02-19 19:01:53,244 [MainThread ] [INFO ] Writing summaries. [2022-02-19 19:01:53,244 INFO] Writing summaries. 2022-02-19 19:01:53,246 [MainThread ] [INFO ] Processing summaries. Saving system files to ../temp\tmpifttzam8\system and model files to ../temp\tmpifttzam8\model. [2022-02-19 19:01:53,246 INFO] Processing summaries. Saving system files to ../temp\tmpifttzam8\system and model files to ../temp\tmpifttzam8\model. 2022-02-19 19:01:53,247 [MainThread ] [INFO ] Processing files in ../temp\rouge-tmp-2022-02-19-19-01-43/candidate/. [2022-02-19 19:01:53,247 INFO] Processing files in ../temp\rouge-tmp-2022-02-19-19-01-43/candidate/. 2022-02-19 19:02:01,071 [MainThread ] [INFO ] Saved processed files to ../temp\tmpifttzam8\system. [2022-02-19 19:02:01,071 INFO] Saved processed files to ../temp\tmpifttzam8\system. 2022-02-19 19:02:01,072 [MainThread ] [INFO ] Processing files in ../temp\rouge-tmp-2022-02-19-19-01-43/reference/. [2022-02-19 19:02:01,072 INFO] Processing files in ../temp\rouge-tmp-2022-02-19-19-01-43/reference/. 2022-02-19 19:02:08,323 [MainThread ] [INFO ] Saved processed files to ../temp\tmpifttzam8\model. [2022-02-19 19:02:08,323 INFO] Saved processed files to ../temp\tmpifttzam8\model. 2022-02-19 19:02:08,397 [MainThread ] [INFO ] Written ROUGE configuration to ../temp\tmpf2titz53\rouge_conf.xml [2022-02-19 19:02:08,397 INFO] Written ROUGE configuration to ../temp\tmpf2titz53\rouge_conf.xml 2022-02-19 19:02:08,397 [MainThread ] [INFO ] Running ROUGE with command: 'perl C:/Program_Files_AI/pyrouge/tools/ROUGE-1.5.5\ROUGE-1.5.5.pl -e C:/Program_Files_AI/pyrouge/tools/ROUGE-1.5.5\data -c 95 -m -r 1000 -n 2 -a ../temp\tmpf2titz53\rouge_conf.xml' [2022-02-19 19:02:08,397 INFO] Running ROUGE with command: 'perl C:/Program_Files_AI/pyrouge/tools/ROUGE-1.5.5\ROUGE-1.5.5.pl -e C:/Program_Files_AI/pyrouge/tools/ROUGE-1.5.5\data -c 95 -m -r 1000 -n 2 -a ../temp\tmpf2titz53\rouge_conf.xml' --------------------------------------------- 1 ROUGE-1 Average_R: 0.21783 (95%-conf.int. 0.21624 - 0.21946) 1 ROUGE-1 Average_P: 0.42112 (95%-conf.int. 0.41834 - 0.42414) 1 ROUGE-1 Average_F: 0.27553 (95%-conf.int. 0.27375 - 0.27737) --------------------------------------------- 1 ROUGE-2 Average_R: 0.08100 (95%-conf.int. 0.07989 - 0.08223) 1 ROUGE-2 Average_P: 0.16263 (95%-conf.int. 0.16053 - 0.16497) 1 ROUGE-2 Average_F: 0.10347 (95%-conf.int. 0.10216 - 0.10490) --------------------------------------------- 1 ROUGE-L Average_R: 0.20511 (95%-conf.int. 0.20352 - 0.20679) 1 ROUGE-L Average_P: 0.39705 (95%-conf.int. 0.39433 - 0.39996) 1 ROUGE-L Average_F: 0.25953 (95%-conf.int. 0.25780 - 0.26126) [2022-02-19 19:04:43,153 INFO] Rouges at step 8000 >> ROUGE-F(1/2/3/l): 27.55/10.35/25.95 ROUGE-R(1/2/3/l): 21.78/8.10/20.51 Process finished with exit code 0
参考资料:
机器翻译与自动文摘评价指标 BLEU 和 ROUGE
自动文摘评测方法:Rouge-1、Rouge-2、Rouge-L、Rouge-S
文本摘要的评测方法:Rouge-1, Rouge-2, Rouge-L, Rouge-S
自动文摘评测方法:Rouge-1、Rouge-2、Rouge-L、Rouge-S
ROUGE评价方法
记录:Windows7安装pyrouge
Perl 官网
windows 安装 perl 教程
ubuntu 18.04安装pyrouge No such file or directory: ‘yourpath/.pyrouge/settings.ini’
OSError: [WinError 193] %1 is not a valid Win32 application
Windows环境下配置以及使用pyrouge的解决方案
windows环境下如何安装perl的XML::DOM和DB_File
卸载命令行安装的ActivePerl
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。