Translation quality classification method and apparatus

By optimizing the pre-trained language model and using the edit distance scores and quality classification labels of machine translations and proofread translations, a translation quality classification model is trained, which solves the problem of low accuracy in translation quality classification and achieves higher classification accuracy and less reliance on human intervention.

CN117216632BActive Publication Date: 2026-04-21TRANSN IOL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TRANSN IOL TECH CO LTD
Filing Date
2023-08-31
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing translation quality classification methods have low accuracy and take a long time to obtain translator quality labeling data, resulting in a limited classification scope.

Method used

By optimizing the pre-trained language model, utilizing the edit distance score between machine translations and proofread translations, and combining it with quality classification labels, a translation quality classification model is trained to improve classification accuracy.

Benefits of technology

This reduces reliance on manually labeled data, improves the accuracy of translation quality classification, and provides guidance for subsequent translation processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117216632B_ABST
    Figure CN117216632B_ABST
Patent Text Reader

Abstract

This application provides a method and apparatus for translation quality classification. The method includes: acquiring source text and machine translation; inputting the source text and machine translation into a translation quality classification model, and acquiring the classification result output by the translation quality classification model; the translation quality classification model is optimized based on a first edit distance score, which is obtained based on the machine translation and the proofread translation, wherein the proofread translation is the machine translation after proofreading. The translation quality classification method and apparatus provided in this application can optimize a pre-trained language model using the first edit distance score between the machine translation and the proofread translation to obtain a translation quality classification model. This allows the translation quality classification model to output a classification result based on the input source text and machine translation, thereby improving the accuracy of translation quality classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language processing, and in particular to a method and apparatus for classifying translation quality. Background Technology

[0002] Machine translation engines are currently widely used in translation activities as assistants to human translators. However, the quality of machine translation engine results varies greatly, often containing mistranslations, omissions, and additions, which affects the usability of the translation results. If each sentence of the translation is re-evaluated by a human to determine if revisions are needed, the overall efficiency of the translation process is further reduced and the cost of human labor is increased compared to purely human translation.

[0003] Existing translation quality classification methods classify translation quality by learning from the quality labels assigned by translators. However, the accuracy is low, and due to the time-consuming acquisition of translator quality label data, the difficulty of judgment, and inconsistencies in human judgment, the classification accuracy cannot be improved and the scope of application of translation quality classification methods cannot be expanded. Summary of the Invention

[0004] This application provides a method and apparatus for classifying translation quality, in order to solve the technical problem of low accuracy in translation quality classification in related technologies.

[0005] In a first aspect, embodiments of this application provide a method for classifying translation quality, including:

[0006] Obtain the original text and machine translation;

[0007] The original text and the machine translation are input into the translation quality classification model to obtain the classification result output by the translation quality classification model. The translation quality classification model is optimized based on the first edit distance score, which is obtained based on the machine translation and the proofread translation. The proofread translation is the machine translation after proofreading.

[0008] In some embodiments, the training steps of the translation quality classification model include:

[0009] The pre-trained language model is optimized based on the first edit distance score and the second edit distance score; the second edit distance score is obtained based on the original text and the machine translation.

[0010] The original text and the machine translation are input into the optimized pre-trained language model to obtain the classification result;

[0011] Based on the quality classification labels and the classification results, the optimized pre-trained language model is trained to obtain the translation quality classification model.

[0012] In some embodiments, optimizing the pre-trained language model based on the first edit distance score and the second edit distance score further includes:

[0013] The machine translation and the proofread translation are segmented to determine the first edit distance score;

[0014] The original text and the machine translation are input into a pre-trained language model to obtain the second edit distance score output by the pre-trained language model.

[0015] In some embodiments, the step of inputting the original text and the machine translation into a pre-trained language model to obtain a second edit distance score output by the pre-trained language model includes:

[0016] The original text, the machine translation, and the edit distance character are concatenated and input into the pre-trained language model;

[0017] Based on the edit distance characters, an edit distance representation vector is obtained;

[0018] The second edit distance score is determined based on the edit distance representation vector.

[0019] In some embodiments, obtaining the edit distance representation vector based on the edit distance character includes:

[0020] Based on the edit distance characters, obtain the hidden layer vector corresponding to each edit distance character;

[0021] The edit distance representation vector is obtained by weighted summation of multiple hidden layer vectors.

[0022] In some embodiments, optimizing the pre-trained language model based on the first edit distance score and the second edit distance score includes:

[0023] Based on the first edit distance score and the second edit distance score, the mean squared error loss result is calculated;

[0024] Based on the mean squared error loss result, the pre-trained language model is optimized using the gradient descent algorithm.

[0025] In some embodiments, training the optimized pre-trained language model based on the quality classification labels and the classification results to obtain the translation quality classification model includes:

[0026] Based on the quality classification label and the classification result, the cross-entropy loss result is calculated;

[0027] Based on the cross-entropy loss result, the optimized pre-trained language model is trained to obtain the translation quality classification model.

[0028] Secondly, embodiments of this application also provide a translation quality classification device, comprising:

[0029] The first acquisition module is used to acquire the original text and the machine translation;

[0030] The second acquisition module is used to input the original text and the machine translation into the translation quality classification model and obtain the classification result output by the translation quality classification model; the translation quality classification model is optimized based on the first edit distance score, which is obtained based on the machine translation and the proofread translation, and the proofread translation is the machine translation after proofreading.

[0031] In some embodiments, the training steps of the translation quality classification model include:

[0032] The pre-trained language model is optimized based on the first edit distance score and the second edit distance score; the second edit distance score is obtained based on the original text and the machine translation.

[0033] The original text and the machine translation are input into the optimized pre-trained language model to obtain the classification result;

[0034] Based on the quality classification labels and the classification results, the optimized pre-trained language model is trained to obtain the translation quality classification model.

[0035] In some embodiments, optimizing the pre-trained language model based on the first edit distance score and the second edit distance score further includes:

[0036] The machine translation and the proofread translation are segmented to determine the first edit distance score;

[0037] The original text and the machine translation are input into a pre-trained language model to obtain the second edit distance score output by the pre-trained language model.

[0038] In some embodiments, the step of inputting the original text and the machine translation into a pre-trained language model to obtain a second edit distance score output by the pre-trained language model includes:

[0039] The original text, the machine translation, and the edit distance character are concatenated and input into the pre-trained language model;

[0040] Based on the edit distance characters, an edit distance representation vector is obtained;

[0041] The second edit distance score is determined based on the edit distance representation vector.

[0042] In some embodiments, obtaining the edit distance representation vector based on the edit distance character includes:

[0043] Based on the edit distance characters, obtain the hidden layer vector corresponding to each edit distance character;

[0044] The edit distance representation vector is obtained by weighted summation of multiple hidden layer vectors.

[0045] In some embodiments, optimizing the pre-trained language model based on the first edit distance score and the second edit distance score includes:

[0046] Based on the first edit distance score and the second edit distance score, the mean squared error loss result is calculated;

[0047] Based on the mean squared error loss result, the pre-trained language model is optimized using the gradient descent algorithm.

[0048] In some embodiments, training the optimized pre-trained language model based on the quality classification labels and the classification results to obtain the translation quality classification model includes:

[0049] Based on the quality classification label and the classification result, the cross-entropy loss result is calculated;

[0050] Based on the cross-entropy loss result, the optimized pre-trained language model is trained to obtain the translation quality classification model.

[0051] Thirdly, embodiments of this application also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the translation quality classification methods described above.

[0052] Fourthly, embodiments of this application also provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the translation quality classification method as described above.

[0053] Fifthly, embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the translation quality classification method as described above.

[0054] The translation quality classification method and apparatus provided in this application can optimize the pre-trained language model by using the first edit distance score between the machine translation and the proofread translation to obtain a translation quality classification model. This allows the translation quality classification model to output classification results based on the input source text and machine translation, thereby improving the accuracy of translation quality classification. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 This is a flowchart illustrating the translation quality classification method provided in the embodiments of this application;

[0057] Figure 2 This is a flowchart illustrating the process of optimizing a pre-trained language model based on edit distance data scores, as provided in an embodiment of this application.

[0058] Figure 3 This is a schematic diagram of the translation quality classification device provided in the embodiments of this application;

[0059] Figure 4 This is a schematic diagram of the physical structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0060] Today, the key issue is how to make more rational use of existing machine translations and manually revised translations, and how to more accurately determine whether a machine translation needs further modification. This has become a crucial issue for machine translation engines to better assist in translation, accelerate the translation process, and improve translation efficiency.

[0061] To address the problems encountered in machine translation quality assessment within the translation workflow, and leveraging the powerful capabilities and widespread use of pre-trained language models in natural language processing, this application proposes a method to optimize machine translation quality classification results using pre-trained language models and resources generated during the translation process. This application further optimizes the accuracy of subsequent translation quality classification by first predicting the edit distance scores of the machine translation and the proofread translation. Training the translation quality classification model using this method not only reduces reliance on manually labeled quality data but also improves the accuracy of judging the quality classification labels of machine translations, providing guidance for subsequent translation processes.

[0062] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0063] Figure 1 This is a flowchart illustrating the translation quality classification method provided in the embodiments of this application, such as... Figure 1 As shown in the embodiments of this application, a method for classifying translation quality is provided, including:

[0064] Step 101: Obtain the original text and machine translation;

[0065] Step 102: Input the original text and the machine translation into the translation quality classification model and obtain the classification result output by the translation quality classification model; the translation quality classification model is optimized based on the first edit distance score, which is based on the machine translation and the proofread translation, and the proofread translation is the machine translation after proofreading.

[0066] Specifically, the original text and the machine translation are concatenated, segmented, and mapped to a list of word IDs before being input into a trained translation quality classification model. The translation quality classification model can output the probability value of each label, and the label with the highest probability is taken as the quality label corresponding to the predicted machine translation. This quality label is the classification result.

[0067] Among them, the translation quality classification model is generated by optimizing the pre-trained language model based on the first edit distance score.

[0068] The translation quality classification method provided in this application can optimize the pre-trained language model by using the first edit distance score between the machine translation and the proofread translation to obtain a translation quality classification model. This allows the translation quality classification model to output classification results based on the input source text and machine translation, thereby improving the accuracy of translation quality classification.

[0069] In some embodiments, the training steps of the translation quality classification model include:

[0070] The pre-trained language model is optimized based on the first edit distance score and the second edit distance score; the second edit distance score is obtained based on the original text and the machine translation.

[0071] The original text and the machine translation are input into the optimized pre-trained language model to obtain the classification result;

[0072] Based on the quality classification labels and the classification results, the optimized pre-trained language model is trained to obtain the translation quality classification model.

[0073] Specifically, in the embodiments of this application, the training steps of the translation quality classification model mainly include two optimization steps. The first step is to optimize the pre-trained language model based on the first edit distance score and the second edit distance score. The second step is to optimize the pre-trained language model after the above optimization based on the quality classification label and the classification result output by the model, thereby obtaining the translation quality classification model.

[0074] The data can be preprocessed first. Preprocessing steps include: collecting the original text, machine translation, a revised and proofread version of the machine translation, and manually tagged translation quality classification labels; processing the text to remove special characters and HTML tags; and normalizing numbers and punctuation marks (both full-width and half-width characters). Then, the machine translation and its revised and proofread version are segmented into words, and the word-level edit distance score between the two sentences is calculated; this edit distance score is the first edit distance score.

[0075] Then, based on the original text and the machine translation, the second edit distance score is predicted using a pre-trained language model, and the pre-trained language model is optimized based on the difference between the first and second edit distance scores.

[0076] Finally, the pre-trained language model, which has undergone one step of optimization, is further optimized through supervised learning, using the original text, machine translation, and translation quality classification labels as known examples, to generate a translation quality classification model.

[0077] The translation quality classification method provided in this application first optimizes the pre-trained language model using the first edit distance score between the machine translation and the proofread translation, and then performs supervised learning based on the translation quality classification labels to generate a translation quality classification model. This translation quality classification model not only relies less on manually labeled quality data, but also improves the accuracy of judging the quality classification labels of machine translations, providing guidance for subsequent translation processes.

[0078] In some embodiments, optimizing the pre-trained language model based on the first edit distance score and the second edit distance score further includes:

[0079] The machine translation and the proofread translation are segmented to determine the first edit distance score;

[0080] The original text and the machine translation are input into a pre-trained language model to obtain the second edit distance score output by the pre-trained language model.

[0081] Specifically, the machine translation and its revised and proofread translation are segmented into words, and then the word-level edit distance score between the two sentences is calculated. This edit distance score is the first edit distance score, which is the actual edit distance score.

[0082] Using the pre-processed original text, machine translation, and the first edit distance score, a regression task is performed on the pre-trained language model to predict the edit distance score. Based on the difference between the second edit distance score and the first edit distance score output by the pre-trained language model, the model is optimized. Here, the second edit distance score is the edit distance score predicted by the model.

[0083] The translation quality classification method provided in this application can optimize the pre-trained language model by using the first edit distance score between the machine translation and the proofread translation to obtain a translation quality classification model. This allows the translation quality classification model to output classification results based on the input source text and machine translation, thereby improving the accuracy of translation quality classification.

[0084] In some embodiments, the step of inputting the original text and the machine translation into a pre-trained language model to obtain a second edit distance score output by the pre-trained language model includes:

[0085] The original text, the machine translation, and the edit distance character are concatenated and input into the pre-trained language model;

[0086] Based on the edit distance characters, an edit distance representation vector is obtained;

[0087] The second edit distance score is obtained based on the edit distance representation vector.

[0088] Specifically, Figure 2 This is a flowchart illustrating the process of optimizing a pre-trained language model based on edit distance data scores, as provided in an embodiment of this application. Figure 2 As shown, the pre-processed original text, machine translation, and first edit distance data scores are used to perform a regression task to predict edit distance scores on the pre-trained language model.

[0089] The process can begin by concatenating the edit distance characters, the original text, and the machine translation. After word segmentation and mapping to a list of word IDs, this is input into a transformer-based pre-trained language model. Then, the hidden layer vectors corresponding to the edit distance characters in each layer of the pre-trained model are extracted, and multiple hidden layer vectors are weighted and summed according to their dimensions to obtain the edit distance representation vector. This vector is then passed through a multi-layer fully connected neural network to obtain the predicted edit distance score. Finally, the mean squared error loss is calculated based on the predicted and actual edit distance results, and the model is optimized using the Adam optimizer with gradient descent.

[0090] The edit distance character is a special character that does not repeat the text data and can be...<EDIT_DISTANCE> ,<EDIT_SPECIAL> Various forms, etc.

[0091] The translation quality classification method provided in this application improves the pre-trained language model by adding edit distance characters to obtain a second edit distance score and comparing it with the first edit distance score, thereby reducing the reliance on manually labeled quality data.

[0092] In some embodiments, obtaining the edit distance representation vector based on the edit distance character includes:

[0093] Based on the edit distance characters, obtain the hidden layer vector corresponding to each edit distance character;

[0094] The edit distance representation vector is obtained by weighted summation of multiple hidden layer vectors.

[0095] Specifically, the hidden layer vector corresponding to the edit distance character in each layer of the pre-trained language model is extracted, and the multiple hidden layer vectors are weighted and summed according to their dimensions to obtain the edit distance representation vector.

[0096] The translation quality classification method provided in this application improves the pre-trained language model by adding edit distance characters to obtain a second edit distance score and comparing it with the first edit distance score, thereby reducing the reliance on manually labeled quality data.

[0097] In some embodiments, optimizing the pre-trained language model based on the first edit distance score and the second edit distance score includes:

[0098] Based on the first edit distance score and the second edit distance score, the mean squared error loss result is calculated;

[0099] Based on the mean squared error loss result, the pre-trained language model is optimized using the gradient descent algorithm.

[0100] Specifically, the edit distance representation vector is passed through a multi-layer fully connected neural network to obtain the predicted edit distance score. Finally, the mean squared error loss is calculated based on the predicted and actual edit distance results, and the model is optimized using the Adam optimizer with gradient descent.

[0101] The translation quality classification method provided in this application improves the pre-trained language model by adding edit distance characters to obtain a second edit distance score and comparing it with the first edit distance score, thereby reducing the reliance on manually labeled quality data.

[0102] In some embodiments, training the optimized pre-trained language model based on the quality classification labels and the classification results to obtain the translation quality classification model includes:

[0103] Based on the quality classification label and the classification result, the cross-entropy loss result is calculated;

[0104] Based on the cross-entropy loss result, the optimized pre-trained language model is trained to obtain the translation quality classification model.

[0105] Specifically, the pre-trained language model, which has undergone one optimization, is trained using the pre-processed original text, machine translation, and manually labeled translation quality classification tags as training data, and then optimized a second time.

[0106] The original text and machine translation can be concatenated, segmented, and mapped to a list of word IDs before being input into the optimized pre-trained language model. The hidden layer vectors corresponding to each word in both the original text and the machine translation are then taken from the last three layers of the model. These hidden layer vectors are then weighted and summed layer by layer to obtain the final representation vector for each word in both the original text and the translation.

[0107]

[0108] Where l represents the layer number, i represents the word index, and word_vector i This represents the final representation vector of the i-th word.

[0109] After summing and averaging the final representation vectors of the original text and the machine-translated text, we obtain the sentence-level representation vectors of the original text and the machine-translated text respectively:

[0110]

[0111] Where m represents the number of words in the original text, and src_emb represents the sentence-level representation vector of the original text.

[0112]

[0113] Where n represents the number of words in the original text, and mt_emb represents the sentence-level representation vector of the machine translation.

[0114] The absolute values ​​of the sentence-level representation vectors of the original text and the machine translation are subtracted from each other and multiplied together to obtain two feature vectors.

[0115] Then, the sentence-level representation vectors of the original text and the machine translation are concatenated with the two feature vectors mentioned above:

[0116] probs=MLP([src_emb;mt_emb;|src_emb-mt_emb|;src_emb*mt_emb])

[0117] Then, the data is fed into a multi-layer fully connected neural network to obtain the predicted probability of each quality label. The predicted probability value and the actual label result are used to calculate the cross-entropy loss.

[0118]

[0119] Where C is the total number of categories, and loss represents the cross-entropy loss.

[0120] Finally, the Adam optimizer was used to optimize the model using gradient descent to obtain the translation quality classification model.

[0121] The translation quality classification method provided in this application training and optimizing the model based on the quality classification labels and the classification results output by the model, thereby obtaining a translation quality classification model, which can improve the accuracy of translation quality classification.

[0122] Figure 3 This is a schematic diagram of the translation quality classification device provided in the embodiments of this application, as shown below. Figure 3 As shown, the translation quality classification device provided in this application embodiment includes a first acquisition module 301 and a second acquisition module 302, wherein:

[0123] The first acquisition module 301 is used to acquire the original text and the machine translation;

[0124] The second acquisition module 302 is used to input the original text and the machine translation into the translation quality classification model and obtain the classification result output by the translation quality classification model; the translation quality classification model is optimized based on the first edit distance score, which is obtained based on the machine translation and the proofread translation, and the proofread translation is the machine translation after proofreading.

[0125] In some embodiments, the training steps of the translation quality classification model include:

[0126] The pre-trained language model is optimized based on the first edit distance score and the second edit distance score; the second edit distance score is obtained based on the original text and the machine translation.

[0127] The original text and the machine translation are input into the optimized pre-trained language model to obtain the classification result;

[0128] Based on the quality classification labels and the classification results, the optimized pre-trained language model is trained to obtain the translation quality classification model.

[0129] In some embodiments, optimizing the pre-trained language model based on the first edit distance score and the second edit distance score further includes:

[0130] The machine translation and the proofread translation are segmented to determine the first edit distance score;

[0131] The original text and the machine translation are input into a pre-trained language model to obtain the second edit distance score output by the pre-trained language model.

[0132] In some embodiments, the step of inputting the original text and the machine translation into a pre-trained language model to obtain a second edit distance score output by the pre-trained language model includes:

[0133] The original text, the machine translation, and the edit distance character are concatenated and input into the pre-trained language model;

[0134] Based on the edit distance characters, an edit distance representation vector is obtained;

[0135] The second edit distance score is determined based on the edit distance representation vector.

[0136] In some embodiments, obtaining the edit distance representation vector based on the edit distance character includes:

[0137] Based on the edit distance characters, obtain the hidden layer vector corresponding to each edit distance character;

[0138] The edit distance representation vector is obtained by weighted summation of multiple hidden layer vectors.

[0139] In some embodiments, optimizing the pre-trained language model based on the first edit distance score and the second edit distance score includes:

[0140] Based on the first edit distance score and the second edit distance score, the mean squared error loss result is calculated;

[0141] Based on the mean squared error loss result, the pre-trained language model is optimized using the gradient descent algorithm.

[0142] In some embodiments, training the pre-trained language model based on the quality classification labels and the classification results to obtain the translation quality classification model includes:

[0143] Based on the quality classification label and the classification result, the cross-entropy loss result is calculated;

[0144] Based on the cross-entropy loss result, the optimized pre-trained language model is trained to obtain the translation quality classification model.

[0145] Specifically, the translation quality classification device provided in this application embodiment can implement all the method steps implemented in the above translation quality classification method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0146] Figure 4 This is a schematic diagram of the physical structure of the electronic device provided in the embodiments of this application, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a translation quality classification method, which includes:

[0147] Obtain the original text and machine translation;

[0148] The original text and the machine translation are input into the translation quality classification model to obtain the classification result output by the translation quality classification model. The translation quality classification model is optimized based on the first edit distance score, which is obtained based on the machine translation and the proofread translation. The proofread translation is the machine translation after proofreading.

[0149] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0150] In some embodiments, the training steps of the translation quality classification model include:

[0151] The pre-trained language model is optimized based on the first edit distance score and the second edit distance score; the second edit distance score is obtained based on the original text and the machine translation.

[0152] The original text and the machine translation are input into the optimized pre-trained language model to obtain the classification result;

[0153] Based on the quality classification labels and the classification results, the optimized pre-trained language model is trained to obtain the translation quality classification model.

[0154] In some embodiments, optimizing the pre-trained language model based on the first edit distance score and the second edit distance score further includes:

[0155] The machine translation and the proofread translation are segmented to determine the first edit distance score;

[0156] The original text and the machine translation are input into a pre-trained language model to obtain the second edit distance score output by the pre-trained language model.

[0157] In some embodiments, the step of inputting the original text and the machine translation into a pre-trained language model to obtain a second edit distance score output by the pre-trained language model includes:

[0158] The original text, the machine translation, and the edit distance character are concatenated and input into the pre-trained language model;

[0159] Based on the edit distance characters, an edit distance representation vector is obtained;

[0160] The second edit distance score is determined based on the edit distance representation vector.

[0161] In some embodiments, obtaining the edit distance representation vector based on the edit distance character includes:

[0162] Based on the edit distance characters, obtain the hidden layer vector corresponding to each edit distance character;

[0163] The edit distance representation vector is obtained by weighted summation of multiple hidden layer vectors.

[0164] In some embodiments, optimizing the pre-trained language model based on the first edit distance score and the second edit distance score includes:

[0165] Based on the first edit distance score and the second edit distance score, the mean squared error loss result is calculated;

[0166] Based on the mean squared error loss result, the pre-trained language model is optimized using the gradient descent algorithm.

[0167] In some embodiments, training the pre-trained language model based on the quality classification labels and the classification results to obtain the translation quality classification model includes:

[0168] Based on the quality classification label and the classification result, the cross-entropy loss result is calculated;

[0169] Based on the cross-entropy loss result, the optimized pre-trained language model is trained to obtain the translation quality classification model.

[0170] Specifically, the electronic device provided in this application embodiment can implement all the method steps implemented by the method embodiment with the execution subject being an electronic device, and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.

[0171] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is capable of executing the translation quality classification method provided by the above methods, the method comprising:

[0172] Obtain the original text and machine translation;

[0173] The original text and the machine translation are input into the translation quality classification model to obtain the classification result output by the translation quality classification model. The translation quality classification model is optimized based on the first edit distance score, which is obtained based on the machine translation and the proofread translation. The proofread translation is the machine translation after proofreading.

[0174] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the translation quality classification method provided by the methods described above, the method comprising:

[0175] Obtain the original text and machine translation;

[0176] The original text and the machine translation are input into the translation quality classification model to obtain the classification result output by the translation quality classification model. The translation quality classification model is optimized based on the first edit distance score, which is obtained based on the machine translation and the proofread translation. The proofread translation is the machine translation after proofreading.

[0177] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0178] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0179] It should also be noted that the terms "first," "second," etc., used in the embodiments of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same class, and the number of objects is not limited. For example, the first object can be one or more.

[0180] In the embodiments of this application, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0181] In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.

[0182] In this application, "determining B based on A" means that factor A must be considered when determining B. It is not limited to "B can be determined based solely on A," but should also include: "determining B based on A and C," "determining B based on A, C, and E," "determining C based on A, and further determining B based on C," etc. It can also include using A as a condition for determining B, for example, "when A satisfies the first condition, B is determined using the first method"; or "when A satisfies the second condition, B is determined," or "when A satisfies the third condition, B is determined based on the first parameter," etc. Of course, it can also be a condition where A is a factor in determining B, for example, "when A satisfies the first condition, C is determined using the first method, and B is further determined based on C," etc.

[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for classifying translation quality, characterized in that, include: Obtain the original text and machine translation; The original text and the machine translation are input into the translation quality classification model to obtain the classification result output by the translation quality classification model; The translation quality classification model is optimized based on the first edit distance score, which is based on the machine translation and the proofread translation, wherein the proofread translation is the machine translation after proofreading. The translation quality classification model is obtained by optimizing a pre-trained language model, and includes: The machine translation and the proofread translation are segmented to determine the first edit distance score; The original text and the machine translation are input into a pre-trained language model to obtain the second edit distance score output by the pre-trained language model; Optimize the pre-trained language model based on the first edit distance score and the second edit distance score; The original text and the machine translation are input into the optimized pre-trained language model to obtain the classification result; Based on the quality classification labels and the classification results, the optimized pre-trained language model is trained to obtain the translation quality classification model.

2. The translation quality classification method according to claim 1, characterized in that, The step of inputting the original text and the machine translation into a pre-trained language model and obtaining the second edit distance score output by the pre-trained language model includes: The original text, the machine translation, and the edit distance character are concatenated and input into the pre-trained language model; Based on the edit distance characters, an edit distance representation vector is obtained; The second edit distance score is obtained based on the edit distance representation vector.

3. The translation quality classification method according to claim 2, characterized in that, The process of obtaining the edit distance representation vector based on the edit distance character includes: Based on the edit distance characters, obtain the hidden layer vector corresponding to each edit distance character; The edit distance representation vector is obtained by weighted summation of multiple hidden layer vectors.

4. The translation quality classification method according to claim 1, characterized in that, The optimization of the pre-trained language model based on the first edit distance score and the second edit distance score includes: Based on the first edit distance score and the second edit distance score, the mean squared error loss result is calculated; Based on the mean squared error loss result, the pre-trained language model is optimized using the gradient descent algorithm.

5. The translation quality classification method according to claim 1, characterized in that, The process of training the optimized pre-trained language model based on the quality classification labels and the classification results to obtain the translation quality classification model includes: Based on the quality classification label and the classification result, the cross-entropy loss result is calculated; Based on the cross-entropy loss result, the optimized pre-trained language model is trained to obtain the translation quality classification model.

6. A translation quality classification device, characterized in that, include: The first acquisition module is used to acquire the original text and the machine translation; The second acquisition module is used to input the original text and the machine translation into the translation quality classification model and obtain the classification result output by the translation quality classification model; The translation quality classification model is optimized based on the first edit distance score, which is based on the machine translation and the proofread translation, wherein the proofread translation is the machine translation after proofreading. The translation quality classification model is obtained by optimizing a pre-trained language model, and includes: The machine translation and the proofread translation are segmented to determine the first edit distance score; The original text and the machine translation are input into a pre-trained language model to obtain the second edit distance score output by the pre-trained language model; Optimize the pre-trained language model based on the first edit distance score and the second edit distance score; The original text and the machine translation are input into the optimized pre-trained language model to obtain the classification result; Based on the quality classification labels and the classification results, the optimized pre-trained language model is trained to obtain the translation quality classification model.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the translation quality classification method as described in any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the translation quality classification method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Training method of machine translation model fused with XLM-R model

    CN113822078A

  • Method and device for evaluating machine translation quality based on pre-training language model

    CN116484232A