Method for automatically completing a translation fragment during post-editing of a machine translation
By training a translation completion fragment prediction model, the machine translation fragments are automatically completed, solving the problem of low efficiency in manual revision by translators and achieving efficient post-editing of translations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IOL WUHAN INFORMATION TECH CO LTD
- Filing Date
- 2022-08-08
- Publication Date
- 2026-04-24
AI Technical Summary
In the current machine translation post-editing process, translators need to manually revise and input translated text fragments, which is inefficient and does not fully utilize the potential of AI-assisted translation.
A generative model based on NLP is adopted. By synthesizing training data and generating data during the translation process, a translation completion fragment prediction model is trained. The model is then fine-tuned using a transformer or encoder-decoder model to automatically complete the translation fragments.
It improves the efficiency of editing machine translations by automatically completing translated segments instead of manually revising them, significantly increasing the speed and efficiency of translation revision.
Smart Images

Figure CN115270825B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for automatically completing translated text fragments, specifically a method for automatically completing translated text fragments during post-editing of machine-translated text, belonging to the field of translation editing technology. Background Technology
[0002] With the continuous improvement of machine translation quality, post-editing of machine-translated texts has become a common practice for translators. During post-editing, translators need to review the quality of the machine-translated text sentence by sentence and revise the translated sentences as necessary.
[0003] The quality of current neural machine translation engines has improved significantly. In most cases, translators only need to revise local segments of the translated sentence during post-editing. The revision process involves the translator deleting the segment that needs to be revised and then manually typing in the new content to complete the translated sentence. This method, which relies entirely on manual completion, is inefficient and does not fully explore the potential of AI-assisted translation. Summary of the Invention
[0004] The purpose of this invention is to provide a method for automatically completing translated text fragments during post-editing of machine-translated text in order to solve at least one of the above-mentioned technical problems.
[0005] This invention achieves the above objective through the following technical solution: a method for automatically completing translated text segments during post-editing of machine-translated text, comprising the following steps.
[0006] Step 1: Synthesize training data. Translation completion fragment prediction is a generative model based on NLP, which needs to be learned and trained on large-scale data. The training data is generated by two methods: sampling parallel corpora and generating data based on the translation process. The training data generated by these two methods can be used separately or in combination.
[0007] Step 2: Train the translation completion fragment prediction model. This can be done by training a transformer-based model according to a generative translation task, or by fine-tuning a pre-trained encoder-decoder model.
[0008] As a further aspect of the present invention: in step one, sampling parallel corpora specifically includes:
[0009] Suppose we have a set of parallel corpora (src, tgt), where src represents the source sentence and tgt represents the translated sentence; simulating the process of human post-editing, a continuous segment is randomly extracted from the tgt sentence (while preserving the integrity of words and phrases), denoted as tgt. fragment Replace the relevant segment in the tgt sentence with <mask>The tgt sentence after the replacement is denoted as tgt. mask This creates a new set of corpus: (src, tgt mask ,tgt fragment ), where src and tgt mask The input text for model training, tgt fragment The output text for model training; because tgt fragment It is randomly truncated, and different truncation positions can be changed to generate multiple different target corpora on the same set of original corpora (src, tgt).
[0010] As a further aspect of the present invention: in step one, the generation based on translation process data specifically includes:
[0011] The translation process data comes from the recording and collection of data from real translation projects, including: source sentence (src), machine-generated text (MT), and manually edited text (PE). Because the manually edited PE is modified from the machine-generated MT, the differences between the MT and PE are identified through comparison, and the differences in the MT are replaced with the corrected text. <mask>denoted as mt mask The difference, which is the prediction object of the model, is denoted as pe. fragment Thus, a training corpus is obtained: src and mt mask For input, pe fragment This is the output.
[0012] As a further aspect of the present invention: step two, the training based on the transformer model specifically includes:
[0013] Its training process is similar to that of a neural machine translation model, with the input sentence consisting of src and tgt. mask It is assembled and the output is tgt. fragment Or input by src and mt mask It is assembled and output as PE. fragment .
[0014] As a further aspect of the present invention: in step two, the transformer includes an encoder and a decoder.
[0015] As a further aspect of the present invention: the standard architecture of the transformer is such that each encoder is divided into six layers, each layer is further divided into a feedforward network and a multi-head attention layer; the decoder is also divided into six layers, each layer consists of two attention layers and a feedforward network, one is a self-attention layer, and the other is an attention layer composed of the final output of the encoder.
[0016] As a further aspect of the present invention: Step two, the fine-tuning training based on the encoder-decoder pre-trained model, specifically includes:
[0017] The DeltaLM pre-trained model is used and fine-tuned on the training corpus of synthetic training data. DeltaLM is a pre-trained model based on the encoder-decoder architecture. Through parameter sharing and pre-training on large-scale monolingual and bilingual corpora, it has strong text representation and multilingual translation capabilities. Based on this pre-trained model, fine-tuning is performed on the task of translation completion fragment prediction model. It can achieve good translation fragment prediction results with a smaller training corpus.
[0018] The beneficial effects of this invention are as follows: Machine translation is performed on the original sentence to obtain a machine-translated text; the machine-translated text is then manually reviewed to identify the translation segments requiring intervention; after deleting the corresponding translation segments, a machine-translated text to be completed is obtained; the original sentence and the machine-translated text to be completed are jointly input into a translation completion segment prediction model to automatically obtain the content of the segment to be completed, which is then filled back into the original sentence to obtain the completed translation, thus completing the post-editing operation for the corresponding sentence; the automatic generation of the content to be completed through the translation completion segment prediction model replaces the process of manual revision and input by the translator, significantly improving the efficiency of post-editing. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the overall process of the present invention;
[0020] Figure 2 This is a schematic diagram of the training process of the transformer model of the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Example 1
[0023] like Figure 1 As shown, a method for automatically completing translated text segments during post-editing of machine-translated text includes the following steps:
[0024] Step 1: Synthesize training data. Translation completion fragment prediction is a generative model based on NLP, which needs to be learned and trained on large-scale data. Two methods are used to train the data: sampling parallel corpora and generating data based on the translation process. The training data generated by these two methods can be used separately or in combination.
[0025] Step 2: Train the translation completion fragment prediction model. This can be done by training a transformer-based model according to a generative translation task, or by fine-tuning a pre-trained encoder-decoder model.
[0026] In this embodiment of the invention, step one, sampling parallel corpora, specifically includes:
[0027] Suppose we have a set of parallel corpora (src, tgt), where src represents the source sentence and tgt represents the translated sentence; simulating the process of human post-editing, a continuous segment is randomly extracted from the tgt sentence (while preserving the integrity of words and phrases), denoted as tgt. fragment Replace the relevant segment in the tgt sentence with <mask>The tgt sentence after the replacement is denoted as tgt. mask This creates a new set of corpus: (src, tgt mask ,tgt fragment ), where src and tgt mask The input text for model training, tgt fragment The output text for model training; because tgt fragment It is randomly truncated, and different truncation positions can be changed to generate multiple different target corpora on the same set of original corpora (src, tgt).
[0028] Original parallel corpus:
[0029] src: Load application takes into account the actual dimensions of the columns and walls
[0030] tgt:Actual dimensions of stud walls shall be considered for loadapplication
[0031] Target corpus 1:
[0032] src: Load application takes into account the actual dimensions of the columns and walls
[0033] tgt mask Actual dimensions of <mask>shall be considered for
[0034] load application
[0035] tgt fragment stud walls
[0036] Target Corpus 2:
[0037] Src: Load application takes into account the actual dimensions of the columns and walls.
[0038] tgt:Actual dimensions of stud walls shall be considered for <mask>
[0039] tgt fragment :load application
[0040] In this embodiment of the invention, step one, generating data based on the translation process, specifically includes:
[0041] The translation process data comes from the recording and collection of data from real translation projects, including: source sentence (src), machine-generated text (MT), and manually edited text (PE). Because the manually edited PE is based on the machine-generated MT, differences between the MT and PE can be identified through comparison, and the differences in the MT can be replaced. <mask>denoted as mt mask The difference, which is the prediction object of the model, is denoted as pe. fragment Thus, a training corpus is obtained: src and mt mask For input, pe fragment This is the output.
[0042] Original translation process data:
[0043] src: Load application takes into account the actual dimensions of the columns and walls
[0044] mt:The actual size of column and wall shall be considered for loadapplication
[0045] pe:Actual dimensions of stud walls shall be considered for loadapplication
[0046] Target corpus:
[0047] src: Load application takes into account the actual dimensions of the columns and walls
[0048] mt mask : <mask>shall be considered for load application
[0049] PE fragment :Actual dimensions of stud walls
[0050] Example 2
[0051] like Figures 1 to 2 As shown, a method for automatically completing translated text segments during post-editing of machine-translated text includes the following steps:
[0052] Step 1: Synthesize training data. Translation completion fragment prediction is a generative model based on NLP, which needs to be learned and trained on large-scale data. Two methods are used to train the data: sampling parallel corpora and generating data based on the translation process. The training data generated by these two methods can be used separately or in combination.
[0053] Step 2: Train the translation completion fragment prediction model. This can be done by training a transformer-based model according to a generative translation task, or by fine-tuning a pre-trained encoder-decoder model.
[0054] In this embodiment of the invention, step two, training based on the transformer model, specifically includes:
[0055] Its training process is similar to that of a neural machine translation model, with the input sentence consisting of src and tgt. mask It is assembled and the output is tgt. fragment Or input by src and mt mask It is assembled and output as PE. fragment .
[0056] In this embodiment of the invention, step two includes an encoder and a decoder.
[0057] In this embodiment of the invention, the standard architecture of the transformer is such that each encoder is divided into six layers, and each layer is further divided into a feedforward network and a multi-head attention layer; the decoder is also divided into six layers, each layer consisting of two attention layers and a feedforward network, one being a self-attention layer and the other being an attention layer that is combined with the final output of the encoder.
[0058] In this embodiment of the invention, step two, which involves fine-tuning the training based on the encoder-decoder pre-trained model, specifically includes:
[0059] The DeltaLM pre-trained model is used and fine-tuned on the training corpus of synthetic training data. DeltaLM is a pre-trained model based on the encoder-decoder architecture. Through parameter sharing and pre-training on large-scale monolingual and bilingual corpora, it has strong text representation and multilingual translation capabilities. Based on this pre-trained model, fine-tuning is performed on the task of translation completion fragment prediction model. It can achieve good translation fragment prediction results with a smaller training corpus.
[0060] Working principle: A two-stage fine-tuning scheme is used. In the first stage of fine-tuning, training data synthesized by sampling parallel corpora is used for fine-tuning. After the first stage of fine-tuning is completed, training data synthesized based on translation process data is used for the second stage of fine-tuning. Through two-stage fine-tuning, better model prediction results can be achieved.
[0061] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0062] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.< / mask> < / mask> < / mask> < / mask> < / mask> < / mask> < / mask>
Claims
1. A method for automatically completing translated text segments during post-editing of machine-translated text, characterized in that: Includes the following steps Step 1: Synthesize training data. The translation completion fragment prediction is a generative model based on NLP, which is obtained through data learning and training. The training data is generated by two methods: sampling parallel corpora and data generation based on the translation process. Step one specifically includes sampling parallel corpora: 1) Suppose there is a set of parallel corpora (src, tgt), where src represents the original sentence and tgt represents the translated sentence; 2) Simulate the process of manual post-editing: randomly extract a continuous segment from the sentence tgt, preserving the integrity of words and phrases during the extraction, and denot it as tgt. fragment Replace the relevant segment in the tgt sentence with <mask>The tgt sentence after the replacement is denoted as tgt. mask This constitutes a new corpus: (src, tgt) mask , tgt fragment ), where src and tgt mask The input text for model training, tgt fragment The output text for model training;< / mask> 3) Due to tgt fragment It is randomly truncated, and multiple different target corpora are generated on the same set of original corpora (src, tgt) by changing different truncation positions; Step one, based on the translation process data, specifically includes: 1) The translation process data comes from the recording and collection of data from real translation projects, including: source sentences (src), machine-translated text (mt), and manually edited translated text (pe). 2) Since the manually edited translation PE is modified from the machine-translated translation MT, the differences between MT and PE are identified by comparison, and the differences in MT are replaced with the correct parts. <mask>denoted as mt mask The difference, which is the prediction object of the model, is denoted as pe. fragment Thus, a training corpus is obtained: src and mt mask For input, pe fragment For output;< / mask> Step 2: Train the translation completion segment prediction model. This can be done by training a transformer-based model according to a generative translation task, or by fine-tuning a pre-trained encoder-decoder model.
2. The method for automatically completing translated text fragments during machine-translated text editing according to claim 1, characterized in that: Step two, specifically the training based on the transformer model, includes: The input sentence consists of src and tgt. mask It is assembled and the output is tgt. fragment Or input by src and mt mask It is assembled and output as PE. fragment .
3. The method for automatically completing translated text fragments during machine-translated text editing according to claim 1, characterized in that: In step two, the transformer includes an encoder and a decoder.
4. The method for automatically completing translated text fragments during post-editing of machine-translated text according to claim 3, characterized in that: The standard architecture of the transformer consists of six layers for each encoder, and each layer is further divided into a feedforward network and a multi-head attention layer. The decoder is also divided into six layers, each consisting of two attention layers and a feedforward network. One is a self-attention layer, and the other is an attention layer that is combined with the final output of the encoder.
5. The method for automatically completing translated text fragments during machine-translated text editing according to claim 1, characterized in that: Step two, which involves fine-tuning the encoder-decoder pre-trained model, specifically includes: The DeltaLM pre-trained model is used and fine-tuned on the training corpus of synthetic training data. DeltaLM is a pre-trained model based on encoder-decoder architecture. Through parameter sharing and pre-training on large-scale monolingual and bilingual corpora, it has text representation and multilingual translation capabilities.
Citation Information
Patent Citations
Automatic input method and device based on translation, equipment and computer storage medium
CN113761945A