CN116822534A - Interpretation method, interpreter model and computer-readable storage medium for machine translation evaluation indicators based on fine-grained features - Google Patents

Interpretation method, interpreter model and computer-readable storage medium for machine translation evaluation indicators based on fine-grained features Download PDF

Info

Publication number
CN116822534A
CN116822534A CN202310819638.7A CN202310819638A CN116822534A CN 116822534 A CN116822534 A CN 116822534A CN 202310819638 A CN202310819638 A CN 202310819638A CN 116822534 A CN116822534 A CN 116822534A
Authority
CN
China
Prior art keywords
score
fine
sequence
attention
machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310819638.7A
Other languages
Chinese (zh)
Inventor
朱宪超
胡刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Lan Bridge Information Technology Co ltd
Original Assignee
Sichuan Lan Bridge Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Lan Bridge Information Technology Co ltd filed Critical Sichuan Lan Bridge Information Technology Co ltd
Priority to CN202310819638.7A priority Critical patent/CN116822534A/en
Publication of CN116822534A publication Critical patent/CN116822534A/en
Pending legal-status Critical Current

Links

Landscapes

  • Machine Translation (AREA)

Abstract

本发明属于机器翻译技术领域,提供了一种基于细粒度特征的机翻评估指标的解释方法、解释器模型及计算机可读存储介质。本发明通过细粒度特征的机翻评估指标的解释方法/解释器模型,解决了机翻质量评估模型的可解释性不足的问题,并且为质量评估分数提供了适用于机翻场景下的细粒度可解释性特征,这些特征有望应用于机翻译文的人工PE阶段,并提升人工PE的效率。

The invention belongs to the technical field of machine translation and provides an interpretation method, an interpreter model and a computer-readable storage medium for machine translation evaluation indicators based on fine-grained features. The present invention solves the problem of insufficient interpretability of the machine translation quality evaluation model through the interpretation method/interpreter model of the machine translation evaluation index with fine-grained features, and provides fine-grained quality evaluation scores suitable for the machine translation scenario. Interpretability features, these features are expected to be applied to the manual PE stage of machine translation and improve the efficiency of manual PE.

Description

基于细粒度特征的机翻评估指标的解释方法、解释器模型及 计算机可读存储介质Interpretation methods, interpreter models and machine translation evaluation indicators based on fine-grained features computer readable storage media

技术领域Technical field

本发明属于机器翻译技术领域,具体的说,是涉及一种基于细粒度特征的机翻评估指标的解释方法、解释器模型及计算机可读存储介质。The invention belongs to the technical field of machine translation. Specifically, it relates to an interpretation method of machine translation evaluation indicators based on fine-grained features, an interpreter model and a computer-readable storage medium.

背景技术Background technique

在传统的人工评估手段中,评估者通常从翻译充分度、译文流畅度、译文可阅读性三个方面,来评估机翻译文的质量,为了获得更快速地评估,一些研究者提出了BLEU等基于规则的评估指标。BLEU指标基于单词或者N-gram的共现率进行评估,蕴含了人工评估中的充分度指标。近年来,为了更好地评估机翻译文的质量,另一部分研究者提出了BertScore、MoverScore和COMET等基于预训练模型的评估指标,这些指标在评估机翻译文的质量,能兼顾译文的充分度和流畅度,是一种更为先进的评估指标。In traditional manual evaluation methods, evaluators usually evaluate the quality of machine translations from three aspects: translation adequacy, translation fluency, and translation readability. In order to obtain faster evaluation, some researchers have proposed BLEU, etc. Rule-based evaluation metrics. The BLEU index is evaluated based on the co-occurrence rate of words or N-grams, and contains the adequacy index in manual evaluation. In recent years, in order to better evaluate the quality of machine translation, another group of researchers have proposed evaluation indicators based on pre-training models such as BertScore, MoverScore and COMET. These indicators can evaluate the quality of machine translation and take into account the adequacy of the translation. and fluency, which is a more advanced evaluation index.

但在现阶段,BertScore等更为先进的机翻译文评估指标却没有被大规模使用到机翻译文的评估中,其原因在于:这些基于预训练模型的评估指标缺乏可解释性,基于预训练模型的评估指标,却是一个黑盒结构,难以形成合理解释。However, at this stage, more advanced machine translation evaluation indicators such as BertScore have not been used on a large scale to evaluate machine translation. The reason is that these evaluation indicators based on pre-training models lack interpretability. The evaluation index of the model is a black box structure, making it difficult to form a reasonable explanation.

为了解决这一问题,研究者们尝试使用机器学习中的LIME、SHAP等解释器模型,来对机翻评估模型的结果进行解释。但是,这些方法通常只能从词位置级别给出解释,并没有给出更为符合机翻场景的其他解释类型,比如错误的类型等信息;并且基于简单线性模型的解释器模型,不能表达机翻译文质量评估场景下的细粒度特征。In order to solve this problem, researchers have tried to use interpreter models such as LIME and SHAP in machine learning to explain the results of the machine translation evaluation model. However, these methods usually only provide explanations from the word position level, and do not provide other explanation types that are more suitable for machine translation scenarios, such as error types and other information; and the interpreter model based on a simple linear model cannot express machine translation. Fine-grained features in translation quality assessment scenarios.

发明内容Contents of the invention

本发明的目的在于提供一种基于细粒度特征的机翻评估指标的解释方法,以解决现有技术所存在的技术问题。The purpose of the present invention is to provide a method for interpreting machine translation evaluation indicators based on fine-grained features to solve the technical problems existing in the existing technology.

为了实现上述目的,本发明采取的技术方案如下:In order to achieve the above objects, the technical solutions adopted by the present invention are as follows:

一种基于细粒度特征的机翻评估指标的解释方法,包括以下步骤:An interpretation method for machine translation evaluation indicators based on fine-grained features, including the following steps:

步骤S1:将机翻原文序列S=(s1,s2,...,sn),机翻译文序列H=(h1,h2,...,hm),和质量评估分数Q,使用标签拼接到一起;Step S1: Combine the machine-translated original text sequence S = (s 1 , s 2 ,..., s n ), the machine-translated text sequence H = (h 1 , h 2 ,..., h m ), and the quality assessment score Q, use tags to splice them together;

步骤S2:将步骤S1得到的数据输入到预训练模型中,计算得到编码序列:Step S2: Input the data obtained in step S1 into the pre-training model, and calculate the encoding sequence:

T=Encoder(S;H;Q)T=Encoder(S;H;Q)

其中,Encoder为预训练模型,T为通过预训练模型计算得到的上下文标签;Among them, Encoder is the pre-trained model, and T is the context label calculated by the pre-trained model;

步骤S3:对所述编码序列按照输入位置进行切分,得到原文和译文的上下文表示Ttext,以及质量评估分数的上下文表示TscoreStep S3: Segment the encoding sequence according to the input position to obtain the context representation T text of the original text and the translation, and the context representation T score of the quality assessment score;

步骤S4:使用注意力机制,计算原文和译文的上下文表示Ttext,和质量评估分数的上下文表示Tscore的注意权值矩阵:Step S4: Use the attention mechanism to calculate the context representation T text of the original text and the translation, and the attention weight matrix of the context representation T score of the quality assessment score:

attention=softrmax(Ttext⊙Tscore);attention=softrmax(T text ⊙T score );

步骤S5:对注意权值矩阵进行均值池化,获得一维的相对重要性分数State:Step S5: Perform mean pooling on the attention weight matrix to obtain the one-dimensional relative importance score State:

State=MeanPooling(attention).State=MeanPooling(attention).

步骤S6:使用序列标注的标签,标记每个与质量分数相关位置的起止位置,同时为每个位置标记上错误类型,获得细粒度可解释性特征标签;Step S6: Use the labels of the sequence annotation to mark the starting and ending positions of each position related to the quality score, and mark the error type for each position to obtain fine-grained interpretable feature labels;

步骤S7:基于所述相对重要性分数State和所述细粒度可解释性特征标签,使用CRF计算得到序列标签Y=(y1,y2,...,yn+m):Step S7: Based on the relative importance score State and the fine-grained interpretability feature label, use CRF to calculate the sequence label Y = (y 1 , y 2 , ..., y n+m ):

Y=CRF(State)Y=CRF(State)

在一种实施方案中,所述步骤S1中使用SEP标签拼接。In one embodiment, SEP tag splicing is used in step S1.

在一种实施方案中,所述步骤S4中的注意力机制采用点乘注意力机制、连接注意力机制和双线性注意力机制中的一种。In one embodiment, the attention mechanism in step S4 adopts one of dot product attention mechanism, connection attention mechanism and bilinear attention mechanism.

在一种实施方案中,所述步骤S6中使用BIO标签。In one embodiment, BIO tags are used in step S6.

在一种实施方案中,所述步骤S6中细粒度可解释性特征标签包括:In one embodiment, the fine-grained explainability feature labels in step S6 include:

B-miss漏译开始位置,I-miss漏译中间位置;B-miss misses the starting position of translation, I-miss misses the middle position of translation;

B-misT错译开始位置,I-misT错译中间位置;B-misT misinterprets the starting position, I-misT misinterprets the middle position;

B-over过译开始位置,I-over过译中间位置。B-over translation starting position, I-over translation middle position.

在一种实施方案中,所述步骤S1中的机翻原文序列S=(s1,s2,...,sn),机翻译文序列H=(h1,h2,...,hm),和质量评估分数Q,均通过机翻质量评估模型推理得到。In one embodiment, the machine-translated original text sequence S=(s 1 , s 2 ,..., sn ) in step S1 and the machine-translated text sequence H=(h 1 , h 2 ,... , h m ), and the quality assessment score Q are obtained through inference of the machine translation quality assessment model.

在一种实施方案中,所述错误类型的发掘方法如下:首先,通过注意力机制推断机原文序列S=(s1,s2,…,sn),机制译文序列H=(h1,h2,...,hm),和质量评估分数Q的错误片段,并表示为注意力矩阵中的权值高低的信号;然后,将所述权值高低的信号映射为0-n的转移状态信号,其中,n表示错误类型个数。In one embodiment, the method for discovering the error type is as follows: first, infer the machine original text sequence S=(s 1 , s 2 ,..., s n ) through the attention mechanism, and the machine translation sequence H=(h 1 , h 2 ,..., h m ), and the error fragments of the quality evaluation score Q, and are expressed as signals with high and low weights in the attention matrix; then, the signals with high and low weights are mapped to 0-n Transfer status signal, where n represents the number of error types.

为了实现上述目的,本发明还提供了一种基于细粒度特征的机翻评估指标的解释器模型,包括:In order to achieve the above objectives, the present invention also provides an interpreter model of machine translation evaluation indicators based on fine-grained features, including:

拼接模块:将机翻原文序列S=(s1,s2,...,sn),机翻译文序列H=(h1,h2,...,hm),和质量评估分数Q,使用标签拼接到一起;Splicing module: combine the machine-translated original text sequence S = (s 1 , s 2 ,..., s n ), the machine-translated text sequence H = (h 1 , h 2 ,..., h m ), and the quality assessment score Q, use tags to splice them together;

编码序列模块:将得到的数据输入到预训练模型中,计算得到编码序列:Coding sequence module: Input the obtained data into the pre-training model and calculate the coding sequence:

T=Encoder(S;H;Q)T=Encoder(S;H;Q)

其中,Encoder为预训练模型,T为通过预训练模型计算得到的上下文标签;Among them, Encoder is the pre-trained model, and T is the context label calculated by the pre-trained model;

上下文表示模块:对所述编码序列按照输入位置进行切分,得到原文和译文的上下文表示Ttext,以及质量评估分数的上下文表示TscoreContext representation module: segment the coding sequence according to the input position to obtain the context representation T text of the original text and the translation, and the context representation T score of the quality assessment score;

注意权值模块:使用注意力机制,计算原文和译文的上下文表示Ttext,和质量评估分数的上下文表示Tscore的注意权值矩阵:Attention weight module: Use the attention mechanism to calculate the attention weight matrix of the context representation T text of the original text and the translation, and the context representation T score of the quality assessment score:

attention=softmax(Ttext⊙Tscore);attention=softmax(T text ⊙T score );

相对重要性分数模块:对注意权值矩阵进行均值池化,获得一维的相对重要性分数State:Relative importance score module: perform mean pooling on the attention weight matrix to obtain a one-dimensional relative importance score State:

State=MeanPooling(attention);State=MeanPooling(attention);

细粒度可解释性特征标签模块:使用序列标注的标签,标记每个与质量分数相关位置的起止位置,同时为每个位置标记上错误类型,获得细粒度可解释性特征标签;Fine-grained interpretable feature label module: Use sequence annotation labels to mark the starting and ending positions of each position related to the quality score, and at the same time mark the error type for each position to obtain fine-grained interpretable feature labels;

序列标签模块:基于所述相对重要性分数State和所述细粒度可解释性特征标签,使用CRF计算得到序列标签Y=(y1,y2,...,yn+m):Sequence label module: Based on the relative importance score State and the fine-grained interpretability feature label, use CRF to calculate the sequence label Y=(y 1 , y 2 ,..., y n+m ):

Y=CRF(State)。Y=CRF(State).

为了实现上述目的,本发明还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行,以实现所述的基于细粒度特征的机翻评估指标的解释方法。In order to achieve the above object, the present invention also provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by the processor to realize the interpretation of the machine translation evaluation index based on fine-grained features. method.

与现有技术相比,本发明具备以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:

本发明通过细粒度特征的机翻评估指标的解释方法/解释器模型,解决了机翻质量评估模型的可解释性不足的问题,并且为质量评估分数提供了适用于机翻场景下的细粒度可解释性特征,这些特征有望应用于机翻译文的人工PE阶段,并提升人工PE的效率。The present invention solves the problem of insufficient interpretability of the machine translation quality evaluation model through the interpretation method/interpreter model of the machine translation evaluation index with fine-grained features, and provides fine-grained quality evaluation scores suitable for the machine translation scenario. Interpretability features, these features are expected to be applied to the manual PE stage of machine translation and improve the efficiency of manual PE.

附图说明Description of the drawings

图1为本发明-实施例1的流程示意图。Figure 1 is a schematic flow chart of Embodiment 1 of the present invention.

图2为本发明-实施例2中解释器模型的模型结构示意图。Figure 2 is a schematic diagram of the model structure of the interpreter model in Embodiment 2 of the present invention.

图3为本发明-实施例2中解释器模型的原理框图。Figure 3 is a functional block diagram of the interpreter model in Embodiment 2 of the present invention.

具体实施方式Detailed ways

为了使得本领域技术人员对本发明有更清晰的认知和了解,以下结合实施例对本发明进行进一步的详细说明。应当知晓的,下述所描述的具体实施例只是用于解释本发明,方便理解,本发明所提供的技术方案并不局限于下述实施例所提供的技术方案,实施例所提供的技术方案也不应当限制本发明的保护范围。In order to enable those skilled in the art to have a clearer understanding of the present invention, the present invention will be further described in detail below with reference to examples. It should be known that the specific embodiments described below are only used to explain the present invention and facilitate understanding. The technical solutions provided by the present invention are not limited to the technical solutions provided by the following examples. The technical solutions provided by the embodiments Nor should it limit the scope of the present invention.

需要说明的是,以下实施例中所提供的图示仅以示意方式说明本发明的基本构想,故图式中仅显示与本发明中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Therefore, the drawings only show the components related to the present invention and do not follow the actual implementation of the component numbers, shapes and components. Dimension drawing, in actual implementation, the type, quantity and proportion of each component can be arbitrarily changed, and the component layout type may also be more complex.

实施例1Example 1

如图1所示,本实施例提供了一种基于细粒度特征的机翻评估指标的解释方法,该方法基于细粒度特征实现对机翻评估指标的解释,其具体包括如下实现步骤:As shown in Figure 1, this embodiment provides a method for interpreting machine translation evaluation indicators based on fine-grained features. This method implements the interpretation of machine translation evaluation indicators based on fine-grained features. It specifically includes the following implementation steps:

步骤S1:将机翻原文序列S=(s1,s2,...,sn),机翻译文序列H=(h1,h2,...,hm),和质量评估分数Q,使用SEP标签拼接到一起,其中,机翻原文序列S=(s1,s2,...,sn),机翻译文序列H=(h1,h2,...,hm),和质量评估分数Q,均通过机翻质量评估模型推理得到。实例:原始数据为原文句子:Ilike NBA,译文句子:我喜欢篮球,HTER分数:0.32,则预处理至步骤S1(包含分词和数据拼接操作):[CLS]I like NBA,[SEP]我 喜欢 篮球,[SEP]0.32。Step S1: Combine the machine-translated original text sequence S = (s 1 , s 2 ,..., s n ), the machine-translated text sequence H = (h 1 , h 2 ,..., h m ), and the quality assessment score Q, use SEP tags to splice them together, where the machine-translated original text sequence S = (s 1 , s 2 ,..., s n ), and the machine-translated text sequence H = (h 1 , h 2 ,..., h m ), and the quality assessment score Q, are both obtained through inference of the machine translation quality assessment model. Example: The original data is the original sentence: I like NBA, the translated sentence: I like basketball, HTER score: 0.32, then preprocessing goes to step S1 (including word segmentation and data splicing operations): [CLS] I like NBA, [SEP] I like Basketball, [SEP] 0.32.

步骤S2:将步骤S1得到的数据输入到预训练模型中,计算得到编码序列:Step S2: Input the data obtained in step S1 into the pre-training model, and calculate the encoding sequence:

T=Encoder(S;H;Q)T=Encoder(S;H;Q)

其中,Encoder为预训练模型,例如:XLM-R,本领域技术人员也可以选择其他训练模型,在此不作特别限定;T为通过预训练模型计算得到的上下文标签;进一步的,该步骤还包括通过预训练模型推断原文序列、机翻译文序列和质量评估分数的错误片段,并通过错误片段发掘错误类型。Among them, Encoder is a pre-trained model, such as: The pre-trained model is used to infer the error fragments of the original text sequence, the machine-translated text sequence and the quality assessment score, and the error types are discovered through the error fragments.

步骤S3:对编码序列按照输入位置进行切分,得到原文和译文的上下文表示Ttext,以及质量评估分数的上下文表示TscoreStep S3: Segment the encoding sequence according to the input position to obtain the context representation T text of the original text and the translation, and the context representation T score of the quality assessment score;

步骤S4:使用点乘注意力机制、连接注意力机制和双线性注意力机制中的一种,计算原文和译文的上下文表示Ttext,和质量评估分数的上下文表示Tscore的注意权值矩阵:Step S4: Use one of the dot product attention mechanism, the connection attention mechanism and the bilinear attention mechanism to calculate the context representation T text of the original text and the translation, and the attention weight matrix of the context representation T score of the quality assessment score. :

attention=softmax(Ttext⊙Tscore);attention=softmax(T text ⊙T score );

结合上述实例,通过预训练模型生成隐层表示,并经过注意力层计算注意力权值,模型已经能关注到“NBA”和“篮球”之间的对应异常;Combining the above examples, the hidden layer representation is generated through the pre-training model, and the attention weight is calculated through the attention layer. The model can already pay attention to the corresponding anomalies between "NBA" and "basketball";

步骤S5:对注意权值矩阵进行均值池化,获得一维的相对重要性分数State:Step S5: Perform mean pooling on the attention weight matrix to obtain the one-dimensional relative importance score State:

State=MeanPooling(attention).State=MeanPooling(attention).

步骤S6:使用序列标注的BIO标签,标记每个与质量分数相关位置的起止位置,同时为每个位置标记上错误类型,获得细粒度可解释性特征标签,该标签共包括三对,具体如下:(1)B-miss漏译开始位置,I-miss漏译中间位置;(2)B-misT错译开始位置,I-misT错译中间位置;(3)B-over过译开始位置,I-over过译中间位置;其中,错误类型的发掘方法如下:在步骤S4和S5中,通过注意力机制推断机翻原文序列、机翻译文序列和质量评估分数相关的错误片段,并表示为注意力矩阵中的权值高低的信号,步骤S6和S7通过后续的神经网络模型,将上述权值高低的信号映射为0-n的转移状态信号,其中n表示错误类型个数,以此实现从错误片段发掘错误类型。Step S6: Use the BIO tags of sequence annotation to mark the starting and ending positions of each position related to the quality score, and mark the error type for each position to obtain fine-grained interpretable feature tags. The tags include three pairs in total, as follows (1) The starting position of B-miss missing translation, the middle position of I-miss missing translation; (2) The starting position of B-misT mistranslation, the middle position of I-misT mistranslation; (3) The starting position of B-over over-translation, I-over over-translation is in the middle position; among them, the error type discovery method is as follows: In steps S4 and S5, the attention mechanism is used to infer the error fragments related to the machine-translated original text sequence, the machine-translated text sequence and the quality assessment score, and are expressed as For the signals with high and low weights in the attention matrix, steps S6 and S7 use the subsequent neural network model to map the above-mentioned signals with high and low weights into 0-n transition state signals, where n represents the number of error types. This is achieved by Discover error types from error fragments.

步骤S7:基于相对重要性分数State和细粒度可解释性特征标签,使用CRF(Conditional Random Field,条件随机场)计算得到序列标签Y=(y1,y2,...,yn+m):Step S7: Based on the relative importance score State and fine-grained interpretability feature labels, use CRF (Conditional Random Field, conditional random field) to calculate the sequence label Y = (y 1 , y 2 ,..., y n+m ):

Y=CRF(State);Y=CRF(State);

结合上述实例,通过上述步骤的处理,获得相应的错误位置标签:0 0 0 B-misT 00 0 0 B-misT 0 0。Combined with the above example, through the processing of the above steps, the corresponding error location label is obtained: 0 0 0 B-misT 00 0 0 B-misT 0 0.

在现有技术中,可解释性评估结果没有计算(发掘)错误片段的错误类型,本发明申请所提供的技术方案在标注出错误片段的同时,继续计算错误片段对应的错误类型。In the prior art, the interpretability evaluation results do not calculate (discover) the error types of the error fragments. The technical solution provided by the present application not only marks the error fragments, but also continues to calculate the error types corresponding to the error fragments.

实施例2Example 2

如图2和3所示,本实施例提供了一种基于细粒度特征的机翻评估指标的解释器模型,该解释器模型包括:As shown in Figures 2 and 3, this embodiment provides an interpreter model for machine translation evaluation indicators based on fine-grained features. The interpreter model includes:

拼接模块:将机翻原文序列S=(s1,s2,...,sn),机翻译文序列H=(h1,h2,...,hm),和质量评估分数Q,使用SEP标签拼接到一起;其中,机翻原文序列S=(s1,s2,...,sn),机翻译文序列H=(h1,h2,...,hm),和质量评估分数Q,均通过机翻质量评估模型推理得到;Splicing module: combine the machine-translated original text sequence S = (s 1 , s 2 ,..., s n ), the machine-translated text sequence H = (h 1 , h 2 ,..., h m ), and the quality assessment score Q, use SEP tags to splice them together; among them, the machine-translated original text sequence S = (s 1 , s 2 ,..., s n ), and the machine-translated text sequence H = (h 1 , h 2 ,..., h m ), and the quality assessment score Q, are both obtained through inference of the machine translation quality assessment model;

编码序列模块:将得到的数据输入到预训练模型中,计算得到编码序列:Coding sequence module: Input the obtained data into the pre-training model and calculate the coding sequence:

T=Encoder(S;H;Q)T=Encoder(S;H;Q)

其中,Encoder为预训练模型,T为通过预训练模型计算得到的上下文标签;Among them, Encoder is the pre-trained model, and T is the context label calculated by the pre-trained model;

上下文表示模块:对编码序列按照输入位置进行切分,得到原文和译文的上下文表示Ttext,以及质量评估分数的上下文表示TscoreContext representation module: Segment the encoding sequence according to the input position to obtain the context representation T text of the original text and the translation, and the context representation T score of the quality assessment score;

注意权值模块:使用点乘注意力机制、连接注意力机制或双线性注意力机制,计算原文和译文的上下文表示Ttext,和质量评估分数的上下文表示Tscore的注意权值矩阵:Attention weight module: Use dot product attention mechanism, connection attention mechanism or bilinear attention mechanism to calculate the attention weight matrix of the context representation T text of the original text and the translation, and the context representation T score of the quality assessment score:

attention=softmax(Ttext⊙Tscore);attention=softmax(T text ⊙T score );

相对重要性分数模块:对注意权值矩阵进行均值池化,获得一维的相对重要性分数State:Relative importance score module: perform mean pooling on the attention weight matrix to obtain a one-dimensional relative importance score State:

State=MeanPooling(attention).State=MeanPooling(attention).

细粒度可解释性特征标签模块:使用序列标注的BIO标签,标记每个与质量分数相关位置的起止位置,同时为每个位置标记上错误类型,获得细粒度可解释性特征标签:B-miss漏译开始位置,I-miss漏译中间位置;B-misT错译开始位置,I-misT错译中间位置;B-over过译开始位置,I-over过译中间位置;Fine-grained interpretable feature label module: Use the BIO label of sequence annotation to mark the starting and ending positions of each position related to the quality score, and mark the error type for each position to obtain a fine-grained interpretable feature label: B-miss The starting position of missed translation, the middle position of I-miss missing translation; the starting position of B-misT mistranslation, the middle position of I-misT mistranslation; the starting position of B-over over-translation, the middle position of I-over over-translation;

序列标签模块:基于相对重要性分数State和细粒度可解释性特征标签,使用CRF计算得到序列标签Y=(y1,y2,...,yn+m):Sequence label module: Based on the relative importance score State and fine-grained interpretability feature labels, the sequence label Y=(y 1 , y 2 ,..., y n+m ) is calculated using CRF:

Y=CRF(State)。Y=CRF(State).

需要说明的是,上述各模块的结构和/或原理与实施例1所述的基于细粒度特征的机翻评估指标的解释方法中的内容一一对应,故在此不再赘述。It should be noted that the structure and/or principle of each of the above modules corresponds one-to-one to the content in the method for interpreting machine translation evaluation indicators based on fine-grained features described in Embodiment 1, and therefore will not be described again here.

需要说明的是,应理解以上系统的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开,且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块通过处理元件调用软件的形式实现,部分模块通过硬件的形式实现。例如,某模块可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序代码的形式存储于装置的存储器中,由上述装置的某一个处理元件调用并执行某模块的功能,其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件可以是一种集成电路,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。It should be noted that the division of each module of the above system is only a division of logical functions. In actual implementation, it can be fully or partially integrated into a physical entity, or it can be physically separated, and these modules can all be implemented in software. It can be implemented in the form of calling processing elements; it can also be all implemented in the form of hardware; some modules can also be implemented in the form of calling software through processing elements, and some modules can be implemented in the form of hardware. For example, a certain module can be a separate processing element, or can be integrated into a chip of the device. In addition, it can also be stored in the memory of the device in the form of program code, and can be called and implemented by a certain processing element of the device. Execute the function of a certain module, and the implementation of other modules is similar. In addition, all or part of these modules can be integrated together or implemented independently. The processing element described here may be an integrated circuit with signal processing capabilities. During the implementation process, each step of the above method or each of the above modules can be completed by instructions in the form of hardware integrated logic circuits or software in the processor element.

例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路,或,一个或多个微处理器,或,一个或者多个现场可编程门阵列等。再如,当以上某个模块通过处理元件调度程序代码的形式实现时,该处理元件可以是通用处理器,例如中央处理器或其它可以调用程序代码的处理器。再如,这些模块可以集成在一起,以片上系统的形式实现。For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more specific integrated circuits, or one or more microprocessors, or one or more field programmable circuits. Gate array etc. For another example, when one of the above modules is implemented in the form of a processing element scheduling program code, the processing element can be a general processor, such as a central processing unit or other processor that can call the program code. For another example, these modules can be integrated together and implemented in the form of a system-on-chip.

实施例3Example 3

本实施例提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行,以实现实施例1所提供的基于细粒度特征的机翻评估指标的解释方法。本领域技术人员可以理解:实现实施例1所提供方法的全部或部分步骤可以通过计算机程序相关的硬件来完成,上述的计算机程序可以存储于一计算机可读存储介质中,该程序在执行时,执行包括实施例1所提供方法的步骤;而上述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。This embodiment provides a computer-readable storage medium on which a computer program is stored, and the computer program is executed by a processor to implement the method for interpreting machine translation evaluation indicators based on fine-grained features provided in Embodiment 1. Those skilled in the art can understand that all or part of the steps for implementing the method provided in Embodiment 1 can be completed by hardware related to a computer program. The above computer program can be stored in a computer-readable storage medium. When the program is executed, Execute steps including the method provided in Embodiment 1; and the above-mentioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other various media that can store program codes.

以上所述即为本发明的优选实施方案。应当说明的是,本领域技术人员,在不脱离本发明的设计原理及技术方案的前提下,还可以作出若干的改进,而这些改进也应当视为本发明的保护范围。The above is the preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements without departing from the design principles and technical solutions of the present invention, and these improvements should also be regarded as the protection scope of the present invention.

Claims (9)

1. The interpretation method of the turning evaluation index based on the fine granularity characteristics is characterized by comprising the following steps of:
step S1: turning original text sequence S= (S) 1 ,s 2 ,...,s n ) Machine translated text sequence h= (H) 1 ,h 2 ,...,h m ) And a quality assessment score Q, spliced together using labels;
step S2: inputting the data obtained in the step S1 into a pre-training model, and calculating to obtain a coding sequence:
T=Encoder(S;H;Q)
wherein, the Encoder is a pre-training model, and T is a context label obtained by calculation through the pre-training model;
step S3: dividing the coding sequence according to the input position to obtain context expression T of the original text and the translated text text And the context of the quality assessment score represents T score
Step S4: calculating contextual representations T of originals and translations using an attention mechanism text And the context of the quality assessment score represents T score Is a matrix of attention weights:
attention=softmax(T text ⊙T score );
step S5: carrying out mean value pooling on the attention weight matrix to obtain a one-dimensional relative importance score State:
State=MeanPooling(attention);
step S6: marking the start and stop positions of each position related to the quality score by using a sequence marked tag, and marking the error type for each position to obtain a fine-granularity interpretable feature tag;
step S7: based onThe relative importance score State and the fine granularity interpretable feature tag are calculated using CRF to obtain a sequence tag Y= (Y) 1 ,y 2 ,...,y n+m ):
Y=CRF(State)。
2. The interpretation method of the turning evaluation index based on the fine granularity characteristics according to claim 1, wherein the interpretation method comprises the following steps: in the step S1, SEP label stitching is used.
3. The method according to claim 2, wherein the attention mechanism in step S4 is one of a point-by-point attention mechanism, a connection attention mechanism, and a bilinear attention mechanism.
4. The method for interpreting a turning evaluation index based on fine-grained characteristics according to claim 3, wherein a BIO tag is used in said step S6.
5. The method for interpreting a machine-turning evaluation index based on fine-grained feature according to claim 4, wherein the fine-grained interpretable feature tag in step S6 comprises:
b-miss translation starting position and I-miss translation intermediate position;
B-misT transliteration start position, I-misT transliteration intermediate position;
b-over-translation start position, I-over-translation intermediate position.
6. The method for interpreting a machine-turning evaluation index based on fine granularity features as claimed in claim 5, wherein the machine-turning original text sequence s= (S) in step S1 1 ,s 2 ,...,s n ) Machine translated text sequence h= (H) 1 ,h 2 ,...,h m ) And the quality evaluation score Q is obtained through machine turning quality evaluation model reasoning.
7. The interpretation method of the turning evaluation index based on the fine granularity feature according to claim 6, characterized in that the error type mining method is as follows; first, the machine-turned original sequence s= (S) is inferred by the attention mechanism 1 ,s 2 ,...,s n ) Machine translated text sequence h= (H) 1 ,h 2 ,...,h m ) And an error segment of the quality assessment score Q, and is represented as a signal of high or low weight in the attention matrix; then, the signals with high and low weight values are mapped into transition state signals of 0-n, wherein n represents the number of error types.
8. An interpreter model of a machine turning evaluation index based on fine granularity characteristics, which is characterized by comprising:
and (3) splicing modules: turning original text sequence S= (S) 1 ,s 2 ,...,s n ) Machine translated text sequence h= (H) 1 ,h 2 ,...,h m ) And a quality assessment score Q, spliced together using labels;
coding sequence module: inputting the obtained data into a pre-training model, and calculating to obtain a coding sequence:
T=Encoder(S;H;Q)
wherein, the Encoder is a pre-training model, and T is a context label obtained by calculation through the pre-training model;
the context representation module: dividing the coding sequence according to the input position to obtain context expression T of the original text and the translated text text And the context of the quality assessment score represents T score
Note weight module: calculating contextual representations T of originals and translations using an attention mechanism text And the context of the quality assessment score represents T score Is a matrix of attention weights:
attention=softrmax(T text ⊙T score );
a relative importance score module: carrying out mean value pooling on the attention weight matrix to obtain a one-dimensional relative importance score State:
State=MeanPooling(attention);
fine granularity interpretability feature tag module: marking the start and stop positions of each position related to the quality score by using a sequence marked tag, and marking the error type for each position to obtain a fine-granularity interpretable feature tag;
sequence tag module: based on the relative importance score State and the fine granularity interpretable feature tag, using CRF calculation to obtain a sequence tag y= (Y) 1 ,y 2 ,...,y n+m ):
Y=CRF(State)。
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program is executed by a processor to implement the interpretation method of the machine turning evaluation index based on fine-grained feature as set forth in any one of claims 1 to 7.
CN202310819638.7A 2023-07-06 2023-07-06 Interpretation method, interpreter model and computer-readable storage medium for machine translation evaluation indicators based on fine-grained features Pending CN116822534A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310819638.7A CN116822534A (en) 2023-07-06 2023-07-06 Interpretation method, interpreter model and computer-readable storage medium for machine translation evaluation indicators based on fine-grained features

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310819638.7A CN116822534A (en) 2023-07-06 2023-07-06 Interpretation method, interpreter model and computer-readable storage medium for machine translation evaluation indicators based on fine-grained features

Publications (1)

Publication Number Publication Date
CN116822534A true CN116822534A (en) 2023-09-29

Family

ID=88118273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310819638.7A Pending CN116822534A (en) 2023-07-06 2023-07-06 Interpretation method, interpreter model and computer-readable storage medium for machine translation evaluation indicators based on fine-grained features

Country Status (1)

Country Link
CN (1) CN116822534A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117273027A (en) * 2023-11-22 2023-12-22 四川语言桥信息技术有限公司 An automatic post-verification method for machine translation based on translation error correction
CN117436460A (en) * 2023-12-22 2024-01-23 武汉大学 Translation quality assessment method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347795A (en) * 2020-10-04 2021-02-09 北京交通大学 Machine translation quality assessment methods, devices, equipment and media
US20210174033A1 (en) * 2019-12-05 2021-06-10 Baidu Online Network Technology (Beijing) Co., Ltd. Method and apparatus for evaluating translation quality
CN114091480A (en) * 2021-11-18 2022-02-25 北京理工大学 An ensemble method for machine translation quality estimation using multiple pre-trained models
CN114580437A (en) * 2022-03-02 2022-06-03 阿里巴巴(中国)有限公司 Training method of translation evaluation model, translation evaluation method, device and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210174033A1 (en) * 2019-12-05 2021-06-10 Baidu Online Network Technology (Beijing) Co., Ltd. Method and apparatus for evaluating translation quality
CN112347795A (en) * 2020-10-04 2021-02-09 北京交通大学 Machine translation quality assessment methods, devices, equipment and media
CN114091480A (en) * 2021-11-18 2022-02-25 北京理工大学 An ensemble method for machine translation quality estimation using multiple pre-trained models
CN114580437A (en) * 2022-03-02 2022-06-03 阿里巴巴(中国)有限公司 Training method of translation evaluation model, translation evaluation method, device and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BIN NI 等: "SynXLM-R: Syntax-Enhanced XLM-R in Translation Quality Estimation", NATURAL LANGUAGE PROCESSING AND CHINESE COMPUTING, pages 27 - 40 *
孟庆晔: "基于预训练语言模型的翻译质量估计研究", 中国优秀硕士学位论文全文数据库, pages 138 - 3146 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117273027A (en) * 2023-11-22 2023-12-22 四川语言桥信息技术有限公司 An automatic post-verification method for machine translation based on translation error correction
CN117273027B (en) * 2023-11-22 2024-04-30 四川语言桥信息技术有限公司 Automatic machine translation post-verification method based on translation error correction
CN117436460A (en) * 2023-12-22 2024-01-23 武汉大学 Translation quality assessment method, device, equipment and storage medium
CN117436460B (en) * 2023-12-22 2024-03-12 武汉大学 Translation quality assessment method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112100404B (en) Knowledge Graph Pre-training Method Based on Structured Context Information
CN109766524B (en) A method and system for extracting M&A announcement information
CN116822534A (en) Interpretation method, interpreter model and computer-readable storage medium for machine translation evaluation indicators based on fine-grained features
CN107145484A (en) A kind of Chinese word cutting method based on hidden many granularity local features
CN110111864A (en) A kind of medical report generation model and its generation method based on relational model
CN111680154B (en) A Method of Attribute-Level Sentiment Analysis of Comment Text Based on Deep Learning
CN111767732A (en) Document content understanding method and system based on graph attention model
US20180365594A1 (en) Systems and methods for generative learning
CN116719934A (en) Method for extracting small sample relation under continuous learning based on prompt contrast learning
CN116861021A (en) Cross-modal retrieval model construction method based on denoising and momentum distillation
CN110502236B (en) Front-end code generation method, system and equipment based on multi-scale feature decoding
CN115934883A (en) Entity relation joint extraction method based on semantic enhancement and multi-feature fusion
US20240152702A1 (en) Specific target-oriented social media tweet sentiment analysis method
CN118151982A (en) Container configuration code completion method, device and equipment based on multitask learning
WO2023134676A1 (en) Method and system for automatically formulating optimization problem using machine learning
CN117496138A (en) Implementation method, device and medium of pseudo-instance comparative learning for point cloud segmentation
CN116402019A (en) Entity relationship joint extraction method and device based on multi-feature fusion
CN114186565B (en) User semantic analysis method in IT operation and maintenance service field
CN115270792A (en) Medical entity identification method and device
CN115982363A (en) Small sample relation classification method, system, medium and electronic device based on prompt learning
CN116227435A (en) Chinese financial evaluation unit extraction method based on inter-word relationship
CN115906846A (en) A Document-Level Named Entity Recognition Method Based on Dual-Graph Hierarchical Feature Fusion
CN114611484A (en) A text analysis method, system, device and medium based on text structure
CN118095260B (en) A Chinese idiom error correction method and device integrating fixed-length sequence to sequence network
CN116050418B (en) Named entity recognition method, device and medium based on fusion of multi-layer semantic features

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230929