Machine translation quality assessment method and device integrating multi-granularity interactive features

By generating a fusion of word-level, interaction features and sentence-level features, combined with BERT and LSTM networks, the accuracy problem of machine translation quality assessment in the absence of reference translations in the existing technology is solved, and the accuracy and accuracy of translation quality assessment are improved. System evaluation capabilities.

CN114510949BActive Publication Date: 2024-09-20ZHONGKE FANYU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111670567.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-11-22
Filing Date
2021-12-31
Publication Date
2024-09-20
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

Existing machine translation quality assessment methods are difficult to accurately measure translation quality without reference translations, and deep learning models are deficient in feature utilization and ignore the interactive relationship of translation features.

Method used

Using the method of fusing multi-granularity interactive features, by generating word-level, interactive features and sentence-level features, using cosine similarity and distribution entropy, combined with the BERT model and the bidirectional LSTM network, linear interpolation is performed to predict the Hter value, enhancing feature interaction and semantic similarity. degree calculation.

Benefits of technology

It improves the accuracy of machine translation quality evaluation and the system's evaluation capabilities, which is better than traditional methods, especially in sentence-level translation quality evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510949B_ABST
    Figure CN114510949B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for evaluating the quality of machine translation by integrating multi-granularity interactive features, including: generating word-level features; generating interactive features; generating sentence-level features; and combining word-level features, interactive features and sentence-level features by linear interpolation to predict Hter values. The present disclosure also provides a device for evaluating the quality of machine translation by integrating multi-granularity interactive features, an electronic device and a readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of machine translation, and in particular to a method, device, electronic device and readable storage medium for evaluating the quality of machine translation integrating multi-granularity interactive features. Background Art

[0002] In recent years, neural machine translation has made great progress, and the quality of translations has been continuously improved. However, there are still a series of problems, such as low fidelity, which is more specifically manifested in the phenomenon of wrong translation and missing translation. Therefore, evaluating the quality of machine translation is an urgent task to be solved. Usually, the quality of machine translation is measured by automatic evaluation methods, such as BLEU, NIST, METEOR, etc. These methods require one or more reference translations, but in model prediction or practical applications, it is very difficult to collect high-quality reference translations for each translation, and the machine translation quality assessment task came into being. Machine translation quality assessment refers to the quality prediction of the system translation results without reference translations. The prediction results can quickly measure the quality of the system translation. It plays an indispensable guiding role in post-editing and computer-assisted translation. The machine translation quality assessment task is divided into document level, sentence level and word level sub-tasks. The sentence-level machine translation quality assessment task is to predict a score for each sentence, and the score represents the workload required for manual post-editing. Generally, sentence-level quality assessment can be regarded as a supervised regression task. In the early days, researchers used artificially designed features for quality assessment. These artificially designed features tended to be explicit features, such as statistical knowledge features of source language sentences and target language sentences. Some researchers also used information existing in machine translation as features, such as the posterior probability score of the machine translation system for the output translation, the number of sentences decoded in beam search and their probability scores, etc. Since deep learning became popular, many researchers have tried to use neural network methods to evaluate the quality of machine translation translations, and automatically extract high-dimensional vectors as features for evaluation through neural network models such as RNN and Transformer. In the methods introduced above, most researchers only focus on extracting richer features, but ignore how to effectively use the extracted features. Although the word vectors obtained under the powerful neural network framework have been fully interacted within the model, for cross-language tasks such as translation quality assessment, more features that reflect the characteristics of translation should be added for evaluation. Whether between fine-grained word vectors of mutually translated pairs or between coarse-grained sentence vectors of source language and target translation, more specific translation features can be mined. Summary of the invention

[0003] In order to solve at least one of the above technical problems, the present disclosure provides a machine translation quality assessment method, device, electronic device and readable storage medium integrating multi-granularity interaction features.

[0004] According to one aspect of the present disclosure, a method for evaluating machine translation quality by integrating multi-granularity interactive features is provided, comprising:

[0005] Generate word-level features;

[0006] Generate interactive features;

[0007] Generate sentence-level features;

[0008] The word-level features, the interaction features and the sentence-level features are combined by a linear interpolation method to predict the Hter value.

[0009] According to at least one embodiment of the present disclosure, the method for evaluating machine translation quality by integrating multi-granularity interactive features, the generated word-level features include:

[0010] For any word in the target language sentence, the word vectors of all subwords of the word are averaged as the word vector of the word;

[0011] Calculate the cosine similarity between each word in the target language sentence and each word in the source language sentence to form a similarity matrix, where the similarity calculation formula is as follows:

[0012]

[0013] Where Sn represents the nth word vector of the source language sentence, and tm represents the mth word vector of the target language sentence;

[0014] The similarity score and distribution entropy of the similarity matrix are used as word-level features.

[0015] According to at least one embodiment of the present disclosure, a method for evaluating machine translation quality by integrating multi-granularity interactive features, generating interactive features includes:

[0016] For any word in the target language sentence, the word vectors of all subwords of the word are averaged as the word vector of the word;

[0017] Calculate the cosine similarity between each word in the target language sentence and each word in the source language sentence to form a similarity matrix, where the similarity calculation formula is as follows:

[0018]

[0019] Where Sn represents the nth word vector of the source language sentence, and tm represents the mth word vector of the target language sentence;

[0020] The similarity score and distribution entropy of the similarity matrix are used as word-level features;

[0021] Select some similarity scores and distribution entropy from the similarity matrix and concatenate them as interactive features. The concatenation formula is as follows:

[0022]

[0023] Among them, m represents the number of words in the target language sentence, Hm represents the distribution entropy of the mth word in the target language sentence, Pi represents the probability after the softmax operation, and the calculation formula of Hm is as follows:

[0024]

[0025] According to at least one embodiment of the present disclosure, a method for evaluating machine translation quality by integrating multi-granularity interactive features is characterized in that the generated sentence-level features include:

[0026] The vector representation of all words in the target language sentence is averaged as the vector representation of the entire sentence. The calculation formula is as follows:

[0027]

[0028] Among them, t i is the vector representation of the word, and m is the number of all words in the target language sentence;

[0029] The vector representation of all words in the source language sentence is averaged as the vector representation of the entire sentence;

[0030] The similarity between the target language sentence and the source language sentence is calculated based on the cosine similarity method, and the calculation formula is as follows:

[0031]

[0032] Among them, hsrc represents the vector representation of the source language sentence, and htgt represents the vector representation of the target language sentence.

[0033] According to at least one embodiment of the present disclosure, a method for evaluating machine translation quality by integrating multi-granularity interactive features is provided, wherein the word-level features, the interactive features, and the sentence-level features are combined by a linear interpolation method to predict an Hter value, including:

[0034] Concatenate the interaction features with the word vector:

[0035] The corresponding value is mapped to between 0 and 1 through the sigmoid activation function;

[0036] Use linear interpolation to combine features and predict Hter values;

[0037] The calculation formula is as follows:

[0038]

[0039] Among them, W represents the weight matrix, Ew represents the word vector, Ei represents the interaction feature, sim s Indicates the similarity between the target language sentence and the source language sentence.

[0040] According to at least one embodiment of the present disclosure, a method for evaluating the quality of machine translation by integrating multi-granularity interactive features is characterized in that the method comprises generating the word-level features and the sentence-level features through a BERT model, including:

[0041] After splicing the source language sentence and the machine translation, a multi-language spliced ​​sentence is formed;

[0042] The multilingual concatenated sentence is input into the BERT model to generate vector representations of each word in the multilingual concatenated sentence.

[0043] According to at least one embodiment of the present disclosure, the method for evaluating the quality of machine translation by integrating multi-granularity interactive features further includes: inputting the high-dimensional vector of the last layer of the BERT model into a bidirectional LSTM network to solve the problem of gradient disappearance and gradient explosion. The calculation formula included in the bidirectional LSTM network is as follows:

[0044] i t =σ(W i ·[h t-1, x t ]+b i )

[0045] f t =σ(W f ·[h t-1 , x t ]+b f )

[0046] o t =σ(W o [h t-1 , x t ]+b o )

[0047]

[0048]

[0049] h t =o t *tanh(C t )

[0050] Among them, σ represents the sigmoid function, i t represents the input gate, f t represents the forget gate, o t represents the output gate, and the input is [h t-1 , x t ],h t Indicates output, C t Indicates the cell state.

[0051] According to another aspect of the present disclosure, a machine translation quality assessment device integrating multi-granularity interactive features is provided, comprising:

[0052] A word level feature generation module, wherein the word level feature generation module is used to generate word level features;

[0053] An interaction feature generation module, wherein the interaction feature generation module is used to generate interaction features;

[0054] A sentence-level feature generation module, wherein the sentence-level feature generation module is used to generate sentence-level features;

[0055] The Hter value calculation module combines the word-level features, the interaction features and the sentence-level features through a linear interpolation method to predict the Hter value.

[0056] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0057] A memory storing execution instructions;

[0058] A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes any one of the methods described above.

[0059] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and the execution instructions are used to implement any of the above-mentioned methods when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0061] Figure 1 It is a flowchart of a method for evaluating the quality of machine translation by integrating multi-granularity interactive features according to an embodiment of the present disclosure.

[0062] Figure 2It is a schematic diagram of the structure of a machine translation quality assessment device integrating multi-granularity interactive features according to an embodiment of the present disclosure.

[0063] Figure 3 It is a schematic diagram of a machine translation quality assessment framework integrating multi-granularity interactive features according to an embodiment of the present disclosure.

[0064] Figure 4 This is a schematic diagram of the LSTM model.

[0065] Figure 5 It is a word level interaction schematic diagram provided according to the present disclosure.

[0066] Figure 6 Schematic diagram of a word-level similarity matrix provided according to the present disclosure.

[0067] Description of Reference Numerals

[0068] 1000 Machine translation quality assessment device integrating multi-granularity interactive features

[0069] 1002 Word-level feature generation module

[0070] 1004 Interactive Feature Generation Module

[0071] 1006 Sentence Level Feature Generation Module

[0072] 1008 Hter value calculation module

[0073] 1100 Bus

[0074] 1200 processor

[0075] 1300 Memory

[0076] 1400 Other circuits. DETAILED DESCRIPTION

[0077] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.

[0078] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0079] Unless otherwise specified, the exemplary embodiments / embodiments shown will be understood as providing exemplary features of various details of some ways in which the technical concept of the present disclosure can be implemented in practice. Therefore, unless otherwise specified, the features of the various embodiments / embodiments can be combined, separated, interchanged and / or rearranged without departing from the technical concept of the present disclosure.

[0080] The use of cross-hatching and / or shading in the accompanying drawings is generally used to make the boundaries between adjacent components clear. As such, unless otherwise specified, the presence or absence of cross-hatching or shading does not convey or indicate any preference or requirement for the specific materials, material properties, dimensions, proportions, commonalities between the components shown, and / or any other characteristics, attributes, properties, etc. of the components. In addition, in the accompanying drawings, the sizes and relative sizes of the components may be exaggerated for clarity and / or descriptive purposes. When the exemplary embodiments can be implemented differently, the specific process sequence can be performed in a different order than described. For example, two successively described processes can be performed substantially simultaneously or in an order opposite to the described order. In addition, the same figure numbers represent the same components.

[0081] When a component is referred to as being "on," "over," "connected to," or "coupled to" another component, the component may be directly on, directly connected to, or directly coupled to the other component, or intervening components may be present. However, when a component is referred to as being "directly on," "directly connected to," or "directly coupled to" another component, there are no intervening components. For this purpose, the term "connected" may refer to a physical connection, an electrical connection, etc., with or without intervening components.

[0082] The terms used herein are for the purpose of describing specific embodiments, and are not intended to be restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, it is explained that there are stated features, integral bodies, steps, operations, parts, assemblies and / or their groups, but it is not excluded that there are or add one or more other features, integral bodies, steps, operations, parts, assemblies and / or their groups. It should also be noted that, as used herein, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values ​​and / or the values ​​provided that will be recognized by those of ordinary skill in the art.

[0083] Figure 1 It is a flowchart of a method for evaluating the quality of machine translation by integrating multi-granularity interactive features according to an embodiment of the present disclosure.

[0084] like Figure 1 As shown, the machine translation quality assessment method S100 integrating multi-granularity interactive features includes:

[0085] S102: Generate word level features;

[0086] S104: Generate interactive features;

[0087] S106: Generate sentence-level features;

[0088] S108: Combining word-level features, interaction features, and sentence-level features through a linear interpolation method to predict Hter values.

[0089] Among them, the generated word level features include:

[0090] For any word in the target language sentence, the word vectors of all subwords of the word are averaged as the word vector;

[0091] Calculate the cosine similarity between each word in the target language sentence and each word in the source language sentence to form a similarity matrix, where the similarity calculation formula is as follows:

[0092]

[0093] Where Sn represents the nth word vector of the source language sentence, and tm represents the mth word vector of the target language sentence;

[0094] The similarity score and distribution entropy of the similarity matrix are used as word-level features.

[0095] Among them, generating interactive features includes:

[0096] For any word in the target language sentence, the word vectors of all subwords of the word are averaged as the word vector;

[0097] Calculate the cosine similarity between each word in the target language sentence and each word in the source language sentence to form a similarity matrix, where the similarity calculation formula is as follows:

[0098]

[0099] Where Sn represents the nth word vector of the source language sentence, and tm represents the mth word vector of the target language sentence;

[0100] The similarity score and distribution entropy of the similarity matrix are used as word-level features;

[0101] Select some similarity scores and distribution entropy from the similarity matrix and concatenate them as interactive features. The concatenation formula is as follows:

[0102]

[0103] Among them, m represents the number of words in the target language sentence, Hm represents the distribution entropy of the mth word in the target language sentence, Pi represents the probability after the softmax operation, and the calculation formula of Hm is as follows:

[0104]

[0105] Among them, it is characterized in that generating sentence level features includes:

[0106] The vector representation of all words in the target language sentence is averaged as the vector representation of the entire sentence. The calculation formula is as follows:

[0107]

[0108] Among them, t i is the vector representation of the word, and m is the number of all words in the target language sentence;

[0109] The vector representation of all words in the source language sentence is averaged as the vector representation of the entire sentence;

[0110] The similarity between the target language sentence and the source language sentence is calculated based on the cosine similarity method. The calculation formula is as follows:

[0111]

[0112] Among them, hsrc represents the vector representation of the source language sentence, and htgt represents the vector representation of the target language sentence.

[0113] Among them, the word-level features, interaction features and sentence-level features are combined by linear interpolation to predict the Hter value, including:

[0114] Concatenate the interaction features with the word vector:

[0115] The corresponding value is mapped to between 0 and 1 through the sigmoid activation function;

[0116] Use linear interpolation to combine features and predict Hter values;

[0117] The calculation formula is as follows:

[0118]

[0119] Among them, W represents the weight matrix, Ew represents the word vector, Ei represents the interaction feature, sim s Indicates the similarity between the target language sentence and the source language sentence.

[0120] Among them, it is characterized by generating word-level features and sentence-level features through the BERT model, including:

[0121] After splicing the source language sentence and the machine translation, a multi-language spliced ​​sentence is formed;

[0122] The multilingual concatenation sentence is input into the BERT model to generate vector representations of each word in the multilingual concatenation sentence.

[0123] This also includes: inputting the high-dimensional vector of the last layer of the BERT model into the bidirectional LSTM network to solve the problem of gradient disappearance and gradient explosion. The calculation formula included in the bidirectional LSTM network is as follows:

[0124] i t =σ(W i ·[h t-1 , x t ]+b i )

[0125] f t =σ(W f ·[h t-1 , x t ]+b f )

[0126] o t =σ(W o [h t-1 , x t ]+b o )

[0127]

[0128]

[0129] h t =o t *tanh(C t )

[0130] Among them, σ represents the sigmoid function, i t represents the input gate, f t represents the forget gate, o t represents the output gate, and the input is [h t-1 , x t ],h t Indicates output, C t Indicates the cell state.

[0131] like Figure 3As shown, the present disclosure provides a machine translation quality assessment framework that integrates multi-granularity interactive features. Among them, the BERT model is Multilingual-BERT. In this framework, the high-dimensional vector of the last layer of the Multilingual-BERT model is input into a bidirectional LSTM network. LSTM is mainly used to solve the problems of gradient vanishing and gradient exploding in the RNN model during long sequence training. The results of gradient vanishing and gradient exploding are the same, but the causes are different. The introduction of a gating mechanism in LSTM to dynamically choose to accept and forget the current state can effectively alleviate such problems. Figure 4 The internal structure of LSTM is shown. Although the multilingual pre-trained model is suitable for handling cross-lingual tasks, the pre-training stage still uses the concatenation of two sentences in the same language as input. The pre-trained model used in this chapter integrates the cross-lingual joint encoding strategy and uses large-scale bilingual parallel corpora for pre-training again to adapt to the scenario of concatenating two sentences in different languages. Specifically, the source language sentence and the target language sentence are concatenated and input into the model together, so that each word between the sentences can fully interact and obtain a better vector representation. At the time of input, [CLS] and [SEP] represent the start and sentence separator of the sentence respectively, for example: [CLS] source language sentence [SEP] target language sentence [SEP]. Here, we not only use the context-related word vectors as features, but also let the word vectors of the source language sentence and the target language sentence further interact as features. In other words, interaction is to explicitly model translation-oriented features at the word level and sentence level. Finally, the word-level and sentence-level translation-oriented features are fused with the context word vector to predict the HTER score.

[0132] Figure 5 is a word level interaction diagram provided by the present disclosure. Figure 5 As shown, each word of the source language sentence (S) and the target language sentence (T) is represented by s = (s1, s2, ..., s n ) and t=(t1,t2,…,t m ). Compared with word vectors, context-related vectors have different vector representations in different contexts. Since BERT uses subword encoding, in the method provided by the present invention, in order to ensure the complete information of word vectors, subwords are merged by judging whether each position contains a subword-specific connector, and the word vectors of all subwords of a word are averaged as the word vector of the complete word. Then the cosine similarity of each word in the target language sentence and each word in the source language sentence is calculated to form a similarity matrix, and the similarity score L is used. ∞ Finally, the similarity score selected from the similarity matrix is ​​concatenated with the similarity distribution entropy as the interactive feature for translation.

[0133] Figure 6 is a schematic diagram of the word-level similarity matrix provided by the present disclosure. In order to verify the reliability of the word-level similarity score, a set of data was randomly selected from the test set, and the word-level similarity matrix was mapped into a heat map, such as Figure 6 As shown in the figure, we can see that "dupliziert" is incorrectly translated as "Duiert". From the similarity matrix, the similarity score of these two words is slightly lower than that of other translation pairs, indicating that the two words are also less semantically similar. It is observed that the similarity score of the two punctuation marks is also relatively low. After analyzing the reasons, we found that punctuation marks do not have actual meaning like nouns or verbs, and the amount of information they carry is limited, so the similarity score is slightly lower. Therefore, through specific examples, we found that the similarity score can be used to measure the translation quality between words in phrases translated from different languages.

[0134] Based on the above machine quality assessment method integrating multi-granularity interactive features, the technical effect is verified through experimental comparison. In the experiment, the multi-language BERT-Base model is used, with the following parameters: number of layers L = 12, hidden units H = 768, number of multi-head attention heads N head =12, total number of parameters T = 1.1×10 8 The parameters of LSTM are: number of layers L = 3, hidden units H = 1000. During training, the number of training rounds is limited to E = 3, and the learning rate R = 2 × 10 -5 , batch size B = 32, maximum length M = 128. Assuming that the training set of the QE task includes N parallel sentence pairs, use x (n) represents the source language sentence, y (n) Represents the target language sentence, HTER (n) (n=1, ..., N) represents the corresponding standard answer. The training goal is to minimize the mean square error of the training data. The optimization goal calculation is shown in the following formula:

[0135]

[0136] Since the training dataset of the QE task is relatively small, this paper uses about 5 million bilingual parallel data to pre-train Multi-BERT twice, so that the model can better handle the input of the concatenation of source language sentences and target language sentences. The pre-trained bilingual parallel data comes from the 2017 WMT data. The QE data uses the WMT2017 English-German task dataset, the WMT2017 German-English task dataset, and the WMT2019 English-German data. The experimental data statistics are shown in the following table.

[0137]

[0138] The experimental results of the method proposed in the present invention compared with other methods on the WMT2017 English-German task, WMT2017 German-English task and WMT19 English-German task datasets are shown in the following table. The experimental indicators use the Pearson correlation coefficient and the Spearman rank correlation coefficient.

[0139]

[0140] The Bilingual Expert model uses a bidirectional Transformer as a feature extractor and predicts quality labels by extracting high-dimensional word vector features and combining them with manually designed features. The POSTECH model uses the Predictor-Estimator framework and the Bi-GRU model as a feature extractor.

[0141]

[0142] It can be seen that the Pearson correlation coefficient of the proposed method is slightly higher than that of the best existing model on the WMT2017 English-German dataset, but the Spearman rank correlation coefficient is relatively low. The Pearson correlation coefficient and Spearman rank correlation coefficient of the proposed method on the WMT2017 German-English dataset are both higher than those of the best existing model.

[0143] The following table shows the experimental results of different models on the WMT19 sentence-level QE English-German task:

[0144]

[0145] It can be seen from the above table that the proposed method performs better than the baseline model, the model of CMULTIMLT, the model of NJUNLP and the model of ETRI, and is slightly lower than the model of UNBABEL which ranks first. After analysis, it is found that UNBABEL adopts the method of integrating sub-models, while the proposed method only uses the BERT single model. Compared with the BERT single model in UNBABEL, the performance of the proposed method is still higher than the best single model PREDEST-BERT in UNBABEL.

[0146] The influence of word-level features and sentence-level features on the proposed method is analyzed on the WMT2019 English-German dataset. Word-level features represent the relationship between source language sentences and target language sentences more fine-grained, while sentence-level features model the relationship between source language sentences and target language sentences as a whole in a coarse-grained manner. The following table shows the comparison results of the ablation experiment:

[0147]

[0148] From the ablation experiment results in the above table, we can see that both word-level features and sentence-level features are helpful to the improvement of the basic model to a certain extent. However, in comparison, sentence-level features are more helpful. After analyzing the reason, we believe that in the sentence-level machine translation quality assessment task, the model pays more attention to the overall translation quality of the sentence.

[0149] The present invention provides a method for evaluating the quality of machine translation that integrates multi-granularity interactions. This method aims to solve the problem that the existing method only focuses on extracting rich features but ignores the interactive relationship between features. ∞ The word-level features are used as the distribution entropy, and the semantic similarity between the source language sentence and the target language sentence is calculated at the sentence level to measure the translation quality of the whole sentence. Then, the word-level features and sentence-level features are fused using linear interpolation. Experiments show that the proposed method outperforms other methods in performance and improves the evaluation accuracy of the system.

[0150] Figure 2 It is a schematic diagram of the structure of a machine translation quality assessment device integrating multi-granularity interactive features according to at least one embodiment of the present disclosure.

[0151] like Figure 2 As shown, a machine translation quality assessment device 1000 integrating multi-granularity interactive features includes:

[0152] A word level feature generation module 1002, the word level feature generation module is used to generate word level features;

[0153] An interaction feature generation module 1004, the interaction feature generation module is used to generate interaction features;

[0154] A sentence level feature generation module 1006, the sentence level feature generation module is used to generate sentence level features;

[0155] The Hter value calculation module 1008 combines word-level features, interaction features, and sentence-level features through a linear interpolation method to predict the Hter value.

[0156] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0157] A memory, the memory stores execution instructions;

[0158] The processor executes the execution instructions stored in the memory, so that the processor executes any of the above methods.

[0159] According to another aspect of the present disclosure, a readable storage medium is provided, in which execution instructions are stored. When the execution instructions are executed by a processor, they are used to implement any of the above methods.

[0160] Figure 2 An example diagram of an apparatus using a hardware implementation of a processing system is shown. The apparatus may include a corresponding module that performs each or several steps in the above flowchart. Therefore, each step or several steps in the above flowchart may be performed by a corresponding module, and the apparatus may include one or more of these modules. The module may be one or more hardware modules specifically configured to perform the corresponding steps, or implemented by a processor configured to perform the corresponding steps, or stored in a computer-readable medium for implementation by a processor, or implemented by some combination.

[0161] The hardware structure can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.

[0162] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.

[0163] Any process or method description in the flowchart or otherwise described herein can be understood as a module, fragment or portion of a code representing one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes other implementations, in which the functions may not be performed in the order shown or discussed, including performing the functions in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by a person skilled in the art of the present disclosure. The processor performs the various methods and processes described above. For example, the method implementation in the present disclosure can be implemented as a software program, which is tangibly contained in a machine-readable medium, such as a memory. In some embodiments, part or all of the software program can be loaded and / or installed via a memory and / or a communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps in the method described above can be performed. Alternatively, in other embodiments, the processor can be configured to perform one of the above methods in any other appropriate manner (e.g., by means of firmware).

[0164] The logic and / or steps represented in the flowchart or otherwise described herein may be embodied in any readable storage medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions on an instruction execution system, apparatus, or device), or in combination with such instruction execution systems, apparatuses, or devices.

[0165] For the purposes of this specification, a "readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use with or in conjunction with an instruction execution system, device or apparatus. More specific examples of readable storage media (a non-exhaustive list) include the following: an electrical connection with one or more wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), a fiber optic device, and a portable read-only memory (CDROM). In addition, the readable storage medium may even be paper or other suitable medium on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a memory.

[0166] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0167] A person skilled in the art may understand that all or part of the steps of implementing the above-mentioned implementation method may be completed by instructing related hardware through a program, and the program may be stored in a readable storage medium, which, when executed, includes one or a combination of the steps of the implementation method.

[0168] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a readable storage medium. The storage medium may be a read-only memory, a disk or an optical disk, etc.

[0169] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present application. In this specification, the schematic representations of the above terms are not necessarily the same embodiment / method or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments / methods or examples described in this specification and the features of the different embodiments / methods or examples, unless they are contradictory.

[0170] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0171] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

Claims

1. A machine translation quality assessment method integrating multi-granularity interactive features, It is characterized in that include: Generate word-level features; Generate interactive features; Generate sentence-level features; as well as The word-level features, the interaction features and the sentence-level features are combined by a linear interpolation method to predict the hter value; The generated word level features include: For any word in the target language sentence, the word vectors of all subwords of the word are averaged as the word vector of the word; Calculate the cosine similarity between each word in the target language sentence and each word in the source language sentence to form a similarity matrix, where the similarity calculation formula is as follows: Among them, S n Represents the nth word vector of the source language sentence, t m Represents the mth word vector of the target language sentence; The similarity score and distribution entropy of the similarity matrix are used as word-level features; Wherein, generating interactive features includes: Select some similarity scores and distribution entropy from the similarity matrix and concatenate them as interactive features. The concatenation formula is as follows: Among them, E i represents the interaction feature, m represents the number of words in the target language sentence, H m represents the distribution entropy of the mth word in the target language sentence, H m The calculation formula is as follows: Among them, p i Represents the probability after softmax operation; The features of the generated sentence level include: The vector representation of all words in the target language sentence is averaged as the vector representation of the entire sentence. The calculation formula is as follows: The vector representation of all words in the source language sentence is averaged as the vector representation of the entire sentence; The similarity between the target language sentence and the source language sentence is calculated based on the cosine similarity method, and the calculation formula is as follows: Among them, h src The vector representation of the source language sentence, h tgt A vector representation of the target language sentence; The word-level features, the interaction features and the sentence-level features are combined by a linear interpolation method to predict the hter value, including: Concatenate the interaction features with the word vector: The corresponding value is mapped to between 0 and 1 through the sigmoid activation function; Use linear interpolation to combine features and predict hter values; The calculation formula is as follows: Among them, W represents the weight matrix, E w Represents word vector, E i Represents interactive features, sim s Indicates the similarity between the target language sentence and the source language sentence.

2. According to the method for evaluating the quality of machine translation by integrating multi-granularity interactive features according to claim 1, It is characterized in that The method includes generating the word-level features and the sentence-level features through the BERT model, including: After splicing the source language sentence and the machine translation, a multi-language spliced ​​sentence is formed; The multilingual concatenated sentence is input into the BERT model to generate vector representations of each word in the multilingual concatenated sentence.

3. A machine translation quality assessment device integrating multi-granularity interactive features, It is characterized in that include: A word level feature generation module, wherein the word level feature generation module is used to generate word level features; An interaction feature generation module, wherein the interaction feature generation module is used to generate interaction features; A sentence-level feature generation module, wherein the sentence-level feature generation module is used to generate sentence-level features; An hter value calculation module combines the word-level features, the interaction features and the sentence-level features by a linear interpolation method to predict the hter value; The generated word level features include: For any word in the target language sentence, the word vectors of all subwords of the word are averaged as the word vector of the word; Calculate the cosine similarity between each word in the target language sentence and each word in the source language sentence to form a similarity matrix, where the similarity calculation formula is as follows: Among them, S n Represents the nth word vector of the source language sentence, t m Represents the mth word vector of the target language sentence; The similarity score and distribution entropy of the similarity matrix are used as word-level features; Wherein, generating interactive features includes: Select some similarity scores and distribution entropy from the similarity matrix and concatenate them as interactive features. The concatenation formula is as follows: Among them, E i represents the interaction feature, m represents the number of words in the target language sentence, H m represents the distribution entropy of the mth word in the target language sentence, H m The calculation formula is as follows: Among them, p i Represents the probability after softmax operation; The features of the generated sentence level include: The vector representation of all words in the target language sentence is averaged as the vector representation of the entire sentence. The calculation formula is as follows: The vector representation of all words in the source language sentence is averaged as the vector representation of the entire sentence; The similarity between the target language sentence and the source language sentence is calculated based on the cosine similarity method, and the calculation formula is as follows: Among them, h src The vector representation of the source language sentence, h tgt A vector representation of the target language sentence; The word-level features, the interaction features and the sentence-level features are combined by a linear interpolation method to predict the hter value, including: Concatenate the interaction features with the word vector: The corresponding value is mapped to between 0 and 1 through the sigmoid activation function; Using a linear interpolation method to combine the word-level features, the interaction features and the sentence-level features and predict the hter value; The calculation formula is as follows: Among them, W represents the weight matrix, E w Represents word vector, E i Represents interactive features, sim s Indicates the similarity between the target language sentence and the source language sentence.

4. An electronic device, It is characterized in that include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instruction stored in the memory so that the processor executes the method according to claim 1 or 2.

5. A readable storage medium, It is characterized in that The readable storage medium stores execution instructions, which are used to implement the method according to claim 1 or 2 when executed by a processor.