BLEU机器翻译评价指标学习笔记
BLEU(bilingual evaluation understudy),双语互译质量评估辅助工具,主要用来评估机器翻译质量的工具。
评判思想:机器翻译结果越接近专业人工翻译的结果,则越好。
实际工作:判断两个句子的相似程度。
计算公式:
BLEU−N=BP⋅exp(∑n=1Nwnlogpn) BLEU-N=BP \cdot exp\Big(\sum_{n=1}^{N}{w_nlog{p_n}}\Big) BLEU−N=BP⋅exp(n=1∑Nwnlogpn)
其中,BP为惩罚因子,pnp_npn为多元精度,wnw_nwn为多元精度对应的权重。
多元精度n-gram precision
原始多元精度
原文:猫坐在垫子上
机器译文: the the the the the the the.
参考译文:The cat is on the mat.
-
1元精度 1-gram
6个词中,5个词命中译文,1元精度p1p_1p1为5/6.
-
2元精度 2-gram
2元词组的精度则是 3/5.
-
3元精度 3-gram
3元词组的精度为1/4.
-
4元精度 4-gram
4元词组的精度为0。
一般情况,1-gram可以代表原文有多少词被单独翻译出来,可以反映译文的充分性,2-gram以上可以反映译文的流畅性,它的值越高说明可读性越好。
-
异常情况
原文:猫坐在垫子上
机器译文: the the the the the the the.
参考译文:The cat is on the mat.此时,1-gram匹配度为7/7,显然,此译文翻译并不充分,此问题为常用词干扰。
改进多元精度
Countwi,jclp=min(Countwi,RefjCountwi)Countclp=max(Countwi,jclp),i=1,2,3⋯pn=∑C∈Candidates∑n−gram∈CCountclip(n−gram)∑C′∈Candidates∑n−gram′∈C′Countclip(n−gram′) Count^{clp}_{w_i,j}=min{(Count_{w_i},Ref_jCount_{w_i})}\\ Count^{clp}=max(Count^{clp}_{w_i,j}),i=1,2,3\cdots\\ p_n=\frac{\sum_{C\in{Candidates}}{\sum_{n-gram\in C}{Count_{clip}(n-gram)}}}{\sum_{C^{'}\in{Candidates}}{\sum_{n-gram^{'}\in C^{'}}{Count_{clip}(n-gram^{'})}}} Countwi,jclp=min(Count