首发于彼得攀的小站
在文本生成中,如何评价生成文本质量是一个很重要的问题。2002年Kishore Papineni et al.提出一个重要评价指标Bleu,该论文引用近万(9000+),是NLP领域的必读文章之一。Bleu最初应用于机器翻译
论文地址:https://www.aclweb.org/anthology/P02-1040
基本思想
- Motivation:
如果机器翻译的译文和人类翻译的结果接近,那么认为机器翻译的结果是好的 - 实现的基本思想:
将机器翻译产生的候选译文与人翻译的多个参考译文相比较,越接近,候选译文的正确率越高。 - 实现的方法:
统计同时出现在系统译文和参考译文中的n-gram的个数,最后把匹配到的n-gram的数目除以系统译文的n-gram数目,得到评测结果
n-gram precision
n-gram将一个句子中连续n个元素作为一个整体,长度为18的句子有18个1-gram,每个单词都是一个1-gram,有17个2-gram。令:
- candidate代表机器翻译的译文
- reference translation代表参考译文
那么n-gram precision代表candidate中的n-gram在所有的reference translation中出现的概率
Candidate 1:It is a guide to action which ensures that the military always obeys the commands of the party.
Candidate 2: It is to insure the troops forever hearing the activity guidebook that party direct.
Reference 1: It is a guide to action that ensures that the military will forever heed Party commands.
Reference 2: It is the guiding principle which guarantees the military forces always being under the command of the Party.
Reference 3: It is the practical guide for the army always to heed the directions of the party .
在上述例子中,Candidate 1的1-gram precision是17/18, 2-gram precision是10/17,即用candidate和reference dictionary中共同出现的n-gram个数除以candidate中总的n-gram个数
modified n-gram recision
上述算法中存在问题:同一个n-gram在不同的reference中重复出现,计算时次数累加,这样的算法显然是不合理的,如下例
Candidate: the the the the the the the.
Reference 1: The cat is on the mat.
Reference 2: There is a cat on the mat.
candidate的1-gram precision是1,显然是不合理的。所以有了做了修正,其modified-gram precision为2/7,其中2=min(7,2)。即candidate和reference dictionary中共同出现的n-gram个数 C o u n t c l i p = m i n ( c o u n t , M a x _ R e f _ C o u n t ) Count_{clip}=min(count, Max\_Ref\_Count) Countclip

Bleu是一种常用的机器翻译评价指标,通过比较机器翻译的候选译文与人类翻译的参考译文中的n-gram匹配度来评估翻译质量。文章详细介绍了Bleu的基本思想、n-gram precision、modified n-gram precision及其计算方法,以及在评价过程中如何考虑句子长度和惩罚因子。实验显示,Bleu得分与人类评价的相关性高,是NLP领域的重要参考指标。
最低0.47元/天 解锁文章
1214

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



