Text translation method, device, equipment and storage medium

By introducing term corpus to generate candidate translated text when the initial translated text generated by the deep learning model fails to meet the standards, it solves the problem that machine translation is difficult to adapt to professional terms and specific contexts, improves translation accuracy and reduces semantic bias.

CN118410811BActive Publication Date: 2024-11-19GUANGZHOU YIHU NETWORK TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410365507.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2024-11-19
Estimated Expiration
2044-03-28

AI Technical Summary

Technical Problem

Machine translation is difficult to adapt to professional terms and specific contexts, resulting in semantic deviations in translation results and the inability to obtain accurate translated texts.

Method used

By obtaining the text and language pairs to be translated, input into the deep learning model completed in the training, the preliminary translated text is generated; if the scoring indicator is below the preset threshold, the matching translated corpus is retrieved in the term corpus, the candidate translated text is generated, and the candidate translated text is filtered from it. Target translation text that meets the optimal criteria for scoring indicators.

Benefits of technology

It improves the accuracy of the translated text, reduces the semantic deviation of the translation results, and provides reference translation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118410811B_ABST
    Figure CN118410811B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a text translation method, apparatus, device and storage medium, the method comprising: obtaining a text to be translated and a language pair, the language pair being used to indicate the source language and the target language of the current translation task; inputting the text to be translated and the language pair into a trained deep learning model to obtain a model translation text corresponding to the target language; when the scoring index corresponding to the model translation text is lower than a preset threshold, retrieving a translation corpus in the corresponding source language that matches the text to be translated in a set terminology corpus, and generating multiple candidate translation texts based on the translation corpus; from multiple candidate translation texts and the model translation text, determining a target translation text that meets the optimal conditions of the scoring index. The accuracy of the translation text is improved and the semantic deviation of the translation result is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a text translation method, apparatus, device, and storage medium. Background Art

[0002] With the continuous advancement of globalization and the rapid development of the Internet, exchanges between countries are becoming more and more extensive. With the growing demand for cross-language communication, traditional manual translation is inefficient and costly, and it is difficult to meet the needs of social development, making people's demand for machine translation more and more urgent. In recent years, machine translation technology has continued to develop. People can quickly generate translation texts through machine translation, which greatly improves translation efficiency.

[0003] However, due to the complexity and ambiguity of language, machine translation cannot adapt to the translation of professional terms and specific contexts due to its limited learning ability. It is easy to have semantic deviations in the translation results and cannot obtain accurate translation texts, which needs to be improved. Summary of the invention

[0004] The embodiments of the present application provide a text translation method, apparatus, device and storage medium to solve the problem that machine translation cannot adapt to the translation of professional terms and specific contexts, is prone to semantic deviation in translation results, and cannot obtain accurate translation text, thereby improving the accuracy of the translated text and reducing the semantic deviation of the translation results.

[0005] In a first aspect, an embodiment of the present application provides a text translation method, the method comprising:

[0006] Obtaining a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task;

[0007] Inputting the text to be translated and the language pair into the trained deep learning model to obtain a model translated text corresponding to the target language;

[0008] When the score index corresponding to the model translation text is lower than a preset threshold, searching a set terminology corpus for a translation corpus corresponding to the source language and matching the text to be translated, and generating a plurality of candidate translation texts based on the translation corpus;

[0009] A target translation text that meets an optimal condition of a scoring index is determined from the multiple candidate translation texts and the model translation text.

[0010] In a second aspect, the present application also provides a text translation device, including:

[0011] An information acquisition module configured to acquire a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task;

[0012] A first translation module is configured to input the text to be translated and the language pair into a trained deep learning model to obtain a model translation text corresponding to the target language;

[0013] A second translation module is configured to, when the score index corresponding to the model translation text is lower than a preset threshold, retrieve a translation corpus corresponding to the source language and matching the text to be translated from a set terminology corpus, and generate a plurality of candidate translation texts based on the translation corpus;

[0014] The target text determination module is configured to determine a target translation text that meets the optimal condition of the scoring index from the multiple candidate translation texts and the model translation text.

[0015] In a third aspect, an embodiment of the present application further provides a text translation device, the device comprising:

[0016] one or more processors;

[0017] a storage device configured to store one or more programs,

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the text translation method described in the embodiment of the present application.

[0019] In a fourth aspect, an embodiment of the present application further provides a non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the text translation method described in the embodiment of the present application when executed by a computer processor.

[0020] In the embodiment of the present application, by obtaining the text to be translated and the language pair, the language pair is used to indicate the source language and the target language of the current translation task; the text to be translated and the language pair are input into the trained deep learning model to obtain the model translation text corresponding to the target language; when the scoring index corresponding to the model translation text is lower than the preset threshold, the translation corpus of the corresponding source language matching the text to be translated is retrieved in the set terminology corpus, and multiple candidate translation texts are generated based on the translation corpus; from multiple candidate translation texts and model translation texts, the target translation text that meets the optimal conditions of the scoring index is determined. The scoring index is set to test the preliminary translation results of the deep learning model, and the translation quality of the current deep learning model is effectively judged; by introducing a terminology corpus adapted to professional terminology and specific context settings when the model translation text does not meet the standards, multiple candidate translation texts are generated based on the terminology corpus, and a reference translation result can be provided; by screening out the target translation text that meets the optimal conditions of the scoring index from multiple candidate translation texts and model translation texts, the accuracy of the translation text can be improved and the semantic deviation of the translation result can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A flowchart of a text translation method provided in an embodiment of the present application;

[0022] Figure 2 A flowchart of a text translation method including a process of determining multiple candidate translation texts provided in an embodiment of the present application;

[0023] Figure 3 A flowchart of a text translation method including a process of matching a phrase to be translated and a source language phrase by similarity provided in an embodiment of the present application;

[0024] Figure 4 A flowchart of a text translation method including a process of updating a terminology corpus according to manual review results provided in an embodiment of the present application;

[0025] Figure 5 A flowchart of a text translation method including a process of updating a terminology corpus according to multiple rounds of manual review results provided in an embodiment of the present application;

[0026] Figure 6 A flowchart of a text translation method including a process of updating a terminology corpus according to manual review results of terminology translation provided in an embodiment of the present application;

[0027] Figure 7 A flowchart of a text translation method including a deep learning model optimization process provided in an embodiment of the present application;

[0028] Figure 8 A structural block diagram of a text translation device provided in an embodiment of the present application;

[0029] Fig. 9 A structural schematic diagram of a text translation device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0031] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0032] In the text translation method provided in the embodiment of the present application, the executor of each step can be a computer device, which refers to any electronic device with data calculation, processing and storage capabilities, such as mobile phones, PCs (Personal Computers), tablet computers and other terminal devices, and can also be servers and other devices, which are not limited in the embodiment of the present application.

[0033] Figure 1 The flowchart of a text translation method provided in an embodiment of the present application can be implemented with a text translation device as the execution subject, and the text translation device can be deployed in an application environment such as a translation service, an application program or a website. Figure 1 As shown, the text translation method specifically includes the following steps:

[0034] Step S101: Obtain a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task.

[0035] The text to be translated may be a text to be translated corresponding to a specific source language input by a user, and the language pair may be a source language and a target language used to indicate a current translation task, and the current translation task is intended to convert the text to be translated into a text corresponding to the target language. For example, the language pair may be Chinese-English, and accordingly, the current translation task needs to convert the Chinese text to be translated into an English text.

[0036] Step S102: input the text to be translated and the language pair into the deep learning model that has been trained to obtain the model translated text corresponding to the target language.

[0037] Among them, the deep learning model can be an open source BERT, GPT and T5 model. By collecting the source language text and the target language text as training data, the training data is segmented, tokenized, cleaned and aligned to ensure that the data format is consistent and available for the model. The selected deep learning model is trained using the training data, and the model parameters are updated by calculating the loss function and using back propagation. Optionally, the hyperparameters of the model can also be adjusted, such as learning rate, batch size, hidden layer size, etc., to optimize the performance and convergence speed of the model. Finally, the validation set can be used to evaluate the trained model, and the model can be adjusted according to the evaluation results. The aforementioned model selection and loss calculation can be adaptively adjusted by the developer according to the computing resources and task requirements of the actual application environment, and this application is not limited here.

[0038] Step S103: When the score index corresponding to the model translated text is lower than a preset threshold, a translation corpus in the corresponding source language matching the text to be translated is searched in the set terminology corpus, and a plurality of candidate translation texts are generated based on the translation corpus.

[0039] Among them, the scoring index can be used to measure the translation quality of the model translation text, and the corresponding scoring index can be obtained by inputting the model translation text into the set language model. The language model can be a model constructed based on a recurrent neural network, a long short-term memory network, a gated recurrent unit, etc., and the self-attention mechanism can be used to capture the long-distance dependency in the text sequence, and the generation of the scoring index of the model translation text can be realized by predicting the next word or filling in the missing words and other tasks. The scoring index can be fluency, information completeness, grammatical correctness, etc., wherein the fluency is used to reflect whether the model translation text is natural, smooth and in line with the language habits and expression habits of the target language, the information completeness is used to reflect whether the translation text fully conveys all the information in the source language text, and the grammatical correctness is used to reflect whether it conforms to the grammatical rules of the target language. Of course, the developer can also select and set one or more scoring indicators for the quality requirements of the translation text according to the actual application scenario, which is not limited in this application. In addition, the preset threshold can be used to judge whether the model translation text meets the expected quality requirements. For the model translation text with a scoring index lower than the preset threshold, it can be regarded as the translation quality not meeting expectations, and it is necessary to combine the candidate translation text generated in the subsequent steps for comprehensive judgment and selection. The terminology corpus can be constructed by collecting multi-field or multi-topic related terms from various sources such as professional literature, industry standards, expert interviews, the Internet, etc. Each term can be obtained by manual professional translation or by comparing bilingual comparison data with existing bilingual texts to establish the correspondence between terms in different languages. Thus, by retrieving the translation corpus corresponding to the source language and matching the text to be translated in the terminology corpus, it can be used to generate the translation text. The translation corpus can be combined according to grammatical rules based on words, phrases or sentences as units to obtain candidate translation texts corresponding to the text to be translated.

[0040] Step S104: Determine a target translation text that meets the optimal condition of the scoring index from the multiple candidate translation texts and the model translation text.

[0041] Among them, based on multiple candidate translation texts and the model translation text, the text with the best scoring index can be screened out as the target translation text. The scoring index can be selected from one or more of fluency, information completeness, grammatical correctness, etc. For example, when there is a single scoring index, the text with the highest score can be selected as the target translation text. When there are multiple scoring indexes, the text with the highest average score can be selected as the target translation text. This application does not limit this.

[0042] In the above, by obtaining the text to be translated and the language pair, the language pair is used to indicate the source language and the target language of the current translation task; the text to be translated and the language pair are input into the trained deep learning model to obtain the model translation text corresponding to the target language; when the scoring index corresponding to the model translation text is lower than the preset threshold, the translation corpus of the corresponding source language matching the text to be translated is retrieved from the set terminology corpus, and multiple candidate translation texts are generated based on the translation corpus; from multiple candidate translation texts and model translation texts, the target translation text that meets the optimal conditions of the scoring index is determined. The scoring index is set to test the preliminary translation results of the deep learning model, and the translation quality of the current deep learning model is effectively judged; by introducing a terminology corpus suitable for professional terminology and specific context settings when the model translation text does not meet the standards, multiple candidate translation texts are generated based on the terminology corpus, and a reference translation result can be provided; by screening the target translation text that meets the optimal conditions of the scoring index from multiple candidate translation texts and model translation texts, the accuracy of the translation text can be improved and the semantic deviation of the translation result can be reduced.

[0043] Figure 2 A flowchart of a text translation method including a process of determining multiple candidate translation texts is provided for an embodiment of the present application. The text to be translated includes at least one sentence to be translated, such as Figure 2 As shown, the text translation method specifically includes the following steps:

[0044] Step S201: Obtain a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task.

[0045] Step S202: input the text to be translated and the language pair into the trained deep learning model to obtain the model translated text corresponding to the target language.

[0046] Step S203: when the score index corresponding to the model translated text is lower than a preset threshold, each sentence to be translated is decomposed into a plurality of phrases to be translated based on a first grammatical rule corresponding to the source language.

[0047] The first grammatical rule may be a rule for how to combine words into sentences in a specific order and structure under the source language system, and the first grammatical rule specifically involves the setting of syntactic structure, sentence components, voice and tense, and grammatical punctuation, etc. Thus, the sentence to be translated can be decomposed according to the first grammatical rule to obtain multiple phrases to be translated, which is conducive to search and matching in the term corpus.

[0048] Step S204: searching the set terminology corpus for multiple source language phrases that meet a preset similarity condition and correspond to each phrase to be translated, and extracting multiple target language phrases that conform to the target language from the multiple language phrases that respectively correspond to the multiple source language phrases.

[0049] The preset similarity condition may be used to select source language phrases that match the phrase to be translated from the term corpus, and the semantic similarity between the phrase to be translated and the source language phrase may be calculated, and the judgment may be made based on whether the semantic similarity is within a preset range. Therefore, each phrase to be translated may correspond to multiple source language phrases that may match, and each source language phrase may correspond to multiple phrases in other languages. By extracting, multiple target language phrases that conform to the target language corresponding to each phrase to be translated may be determined.

[0050] Step S205: According to the second grammar rule corresponding to the target language, multiple target language phrases are combined to determine multiple candidate sentences corresponding to each sentence to be translated.

[0051] Among them, the second grammatical rule may be a rule that specifies how to combine words into sentences in a specific order and structure under the target language system. Each phrase to be translated may correspond to multiple matching source language phrases, and then to multiple possible target language phrases. Multiple target language phrases can be combined according to the second grammatical rule, and multiple candidate sentences can be obtained by combining each semantically similar target language phrase.

[0052] Step S206: Combine multiple candidate sentences corresponding to each sentence to be translated to generate multiple candidate translation texts.

[0053] Among them, according to the order of multiple sentences to be translated in the text to be translated, a candidate sentence can be selected for each sentence to be translated and combined into a candidate translation text. Thus, corresponding to each candidate sentence with similar semantics, multiple candidate translation texts can be combined accordingly.

[0054] Step S207: Determine a target translation text that meets the optimal condition of the scoring index from the multiple candidate translation texts and the model translation text.

[0055] As described above, by breaking down the text to be translated into phrases and searching the set terminology corpus based on phrases, it is helpful to refine the retrieval matching granularity and improve the accuracy of the translation corpus; by gradually combining multiple target language phrases to obtain multiple candidate sentences, and combining multiple candidate sentences to obtain multiple candidate translation texts, it is possible to effectively obtain candidate translation texts with high reference value, which is helpful to provide reliable optional translation results.

[0056] Figure 3The present application provides a flowchart of a text translation method including a process of matching a phrase to be translated and a source language phrase by similarity. Figure 3 As shown, the text translation method specifically includes the following steps:

[0057] Step S301: Obtain a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task.

[0058] Step S302: input the text to be translated and the language pair into the trained deep learning model to obtain the model translated text corresponding to the target language.

[0059] Step S303: When the score index corresponding to the model translated text is lower than a preset threshold, each sentence to be translated is decomposed into a plurality of phrases to be translated based on a first grammatical rule corresponding to the source language.

[0060] Step S304: vectorize each phrase to be translated to obtain a plurality of vectors to be processed.

[0061] Among them, a word embedding model suitable for the translation task can be selected, such as Word2Vec, GloVe, FastText, BERT, etc., which can map the phrases to be translated into a high-dimensional vector space and capture the semantic relationship between words to obtain the vector representation of each phrase to be translated. Optionally, multiple vectors to be processed can be subjected to dimensionality reduction processing to reduce the dimension of the vector and improve the computational efficiency. For example, principal component analysis, t-distributed random neighbor embedding, and other methods can be used for dimensionality reduction processing.

[0062] Step S305: Calculate the similarity between each vector to be processed and the source vector corresponding to the source language phrase in the set term corpus.

[0063] Among them, each source language phrase in the terminology corpus can be set with a corresponding source vector, and the similarity calculation can determine the similarity between the vector to be processed and the source vector by calculating cosine similarity, Euclidean distance, Pearson correlation coefficient, etc., so as to determine whether there is a source language phrase in the terminology corpus that matches the phrase to be translated.

[0064] Step S306: Determine the source language phrases corresponding to the source vectors whose similarity is within a preset range as phrases matching each phrase to be translated.

[0065] The preset range may be a similarity value range for determining a similarity value that meets the matching requirement. When the similarity is within the preset range, it may be considered that the source language phrase corresponding to the source vector matches the phrase to be translated that participates in the calculation.

[0066] Step S307: extracting a plurality of target language phrases that conform to the target language from the plurality of language phrases corresponding to the plurality of source language phrases.

[0067] Step S308: According to the second grammar rule corresponding to the target language, multiple target language phrases are combined to determine multiple candidate sentences corresponding to each sentence to be translated.

[0068] Step S309: Combine multiple candidate sentences corresponding to each sentence to be translated to generate multiple candidate translation texts.

[0069] Step S310: Determine a target translation text that meets the optimal condition of the scoring index from a plurality of candidate translation texts and the model translation text.

[0070] As mentioned above, by introducing vector similarity to quantify the similarity between the phrase to be translated and the source language phrase, it is beneficial to map high-dimensional data to low-dimensional space, thereby simplifying data representation and reducing computational complexity, and effectively improving computational efficiency when processing large-scale translation data.

[0071] Figure 4 The present application embodiment provides a flowchart of a text translation method including a process of updating a terminology corpus according to manual review results. Figure 4 As shown, the text translation method specifically includes the following steps:

[0072] Step S401: Obtain a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task.

[0073] Step S402: input the text to be translated and the language pair into the trained deep learning model to obtain the model translated text corresponding to the target language.

[0074] Step S403: When the score index corresponding to the model translated text is lower than a preset threshold, a translation corpus in the corresponding source language matching the text to be translated is retrieved from the set terminology corpus, and a plurality of candidate translation texts are generated based on the translation corpus.

[0075] Step S404: Determine a target translation text that meets the optimal condition of the scoring index from the multiple candidate translation texts and the model translation text.

[0076] Step S405: Select a first preset number of texts from the plurality of candidate translation texts as first translation texts to be reviewed, so as to perform manual review on the first translation texts to be reviewed.

[0077] The selection of the first preset number of texts may be performed by setting a fixed number of extractions or by setting an extraction ratio. The specific number or ratio may be adaptively adjusted by the developer according to the manual review capacity and review efficiency, which is not limited in this application. The manual review may be performed to determine the translation errors in the first translation text to be reviewed and provide a corrected translation result.

[0078] Step S406: obtaining a first manual review result and a first manual correction result of the first translation text to be reviewed. If there is no unrecorded translation error type in the first manual review result and the translation error rate does not reach a preset threshold, updating the terminology corpus according to the first manual correction result.

[0079] Among them, the first review result can be a mark including the type of translation errors appearing in the first translation text to be reviewed, and the first manual correction result can be the correct translation text after the errors of the first translation text to be reviewed are corrected. The translation error types can include vocabulary errors, semantic errors, grammatical errors, etc. If there are no unrecorded translation error types in the first manual review result, and the translation error rate does not reach the preset threshold, it can be regarded as the end of the sampling of the multiple candidate translation texts, and the current terminology corpus can provide better translation corpus as reference data. Based on the first manual correction result, the erroneous target language phrases can be determined, and the erroneous target language phrases in the terminology corpus can be replaced with correct target language phrases.

[0080] As described above, by adding a manual review process for candidate translation texts, errors in the translation corpus of the terminology corpus can be confirmed and relevant translation errors can be corrected in a timely manner. By regularly verifying and updating the terminology corpus, the accuracy and timeliness of the translation corpus can be ensured.

[0081] Figure 5 A flowchart of a text translation method including a process of updating a terminology corpus according to multiple rounds of manual review results is provided in an embodiment of the present application. Figure 5 As shown, the text translation method specifically includes the following steps:

[0082] Step S501: Obtain a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task.

[0083] Step S502: input the text to be translated and the language pair into the trained deep learning model to obtain the model translated text corresponding to the target language.

[0084] Step S503: When the score index corresponding to the model translated text is lower than a preset threshold, a translation corpus in the corresponding source language matching the text to be translated is retrieved from the set terminology corpus, and a plurality of candidate translation texts are generated based on the translation corpus.

[0085] Step S504: Determine a target translation text that meets the optimal condition of the scoring index from the multiple candidate translation texts and the model translation text.

[0086] Step S505: Select a first preset number of texts from the plurality of candidate translation texts as first translation texts to be reviewed, perform manual review on the first translation texts to be reviewed, and obtain a first manual review result and a first manual correction result of the first translation texts to be reviewed.

[0087] Step S506: When there is no unrecorded translation error type in the first manual review result and the translation error rate does not reach a preset threshold, the terminology corpus is updated according to the first manual correction result.

[0088] Step S507: When there are unrecorded translation error types in the first manual review result and / or the translation error rate reaches a preset threshold, a second preset number of texts are selected from the remaining multiple candidate translation texts as second translation texts to be reviewed, so as to perform manual review on the second translation texts to be reviewed.

[0089] Among them, if there are unrecorded translation error types in the first manual review result, and / or the translation error rate reaches a preset threshold, it can be considered that there is a high possibility that other translation error types exist in the candidate translation, or that the number of errors in the translation corpus in the terminology corpus is large. In this case, a second preset number of texts can continue to be selected from the multiple candidate translation texts for manual review, thereby increasing the number of rounds of random inspections.

[0090] Step S508: Obtain a second manual correction result of the second translation text to be reviewed, and update the terminology corpus according to the first manual correction result and the second manual correction result.

[0091] Based on the first manual correction result and the second manual correction result, erroneous target language phrases may be determined, and the erroneous target language phrases in the term corpus may be replaced with correct target language phrases.

[0092] As mentioned above, by increasing the number of random checks on candidate translation texts, it is effective to increase the intensity of manual review in a timely manner when there may be many errors in the terminology corpus, which is conducive to correcting more possible errors in the terminology corpus and ensuring the quality of text translation.

[0093] Figure 6A flowchart of a text translation method including a process of updating a terminology corpus according to manual review results of terminology translation is provided in an embodiment of the present application. Figure 6 As shown, the text translation method specifically includes the following steps:

[0094] Step S601: Obtain a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task.

[0095] Step S602: input the text to be translated and the language pair into the trained deep learning model to obtain the model translated text corresponding to the target language.

[0096] Step S603: When the score index corresponding to the model translated text is lower than a preset threshold, a translation corpus in the corresponding source language matching the text to be translated is retrieved from the set terminology corpus, and a plurality of candidate translation texts are generated based on the translation corpus.

[0097] Step S604: Determine a target translation text that meets the optimal condition of the scoring index from the multiple candidate translation texts and the model translation text.

[0098] Step S605: extract terminology from multiple candidate translation texts to obtain terminology texts to be reviewed.

[0099] Among them, for the translation of professional terms and specific contexts, the possibility of errors in terminology translation is relatively high. By extracting terms from candidate translation texts, we can obtain terminology texts to be reviewed, which is convenient for manual review of terms. For candidate translation texts, we can perform part-of-speech analysis and word frequency statistics to determine high-frequency nouns, and match high-frequency nouns with related relationships to obtain translation texts of multiple terms to obtain terminology texts to be reviewed.

[0100] Step S606: Submit the terminology text to be reviewed for manual review.

[0101] The manual review may include determining term translation errors in the term text to be reviewed and providing corrected term translation results.

[0102] Step S607: Obtain the third manual correction result of the terminology text to be reviewed, and update the terminology corpus according to the third manual correction result.

[0103] Based on the third manual correction result, erroneous terms can be determined, and the erroneous term translation results in the term corpus are replaced with correct term translation results.

[0104] As mentioned above, by adding a manual review process for the terminology translation in the candidate translation text, errors in the terminology corpus related to the translation corpus can be confirmed, and related translation errors can be corrected in a timely manner. By regularly verifying and updating the terminology corpus, the accuracy and timeliness of the terminology can be ensured, which is conducive to coping with translation scenarios of professional terminology and specific contexts.

[0105] Figure 7 A flowchart of a text translation method including a deep learning model optimization process provided in an embodiment of the present application. Figure 7 As shown, the text translation method specifically includes the following steps:

[0106] Step S701: Obtain a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task.

[0107] Step S702: input the text to be translated and the language pair into the trained deep learning model to obtain the model translated text corresponding to the target language.

[0108] Step S703: When the score index corresponding to the model translated text is lower than a preset threshold, a translation corpus in the corresponding source language matching the text to be translated is retrieved from the set terminology corpus, and a plurality of candidate translation texts are generated based on the translation corpus.

[0109] Step S704: Determine a target translation text that meets the optimal condition of the scoring index from the multiple candidate translation texts and the model translation text.

[0110] Step S705: Select a first preset number of texts from the plurality of candidate translation texts as first translation texts to be reviewed, so as to perform manual review on the first translation texts to be reviewed.

[0111] Step S706: obtaining a first manual review result and a first manual correction result of the first translation text to be reviewed. If there is no unrecorded translation error type in the first manual review result and the translation error rate does not reach a preset threshold, updating the terminology corpus according to the first manual correction result.

[0112] Step S707: Train the deep learning model based on the updated terminology corpus to obtain an optimized deep learning model.

[0113] Among them, the updated terminology corpus can be used as training data for the deep learning model. By training and fine-tuning the deep learning model, the translation ability of the deep learning model can be further optimized and the accuracy of the model's translated text can be improved.

[0114] As mentioned above, by using the corrected and updated terminology corpus as training data for the deep learning model and updating the model training data in a timely manner, it can help improve the translation quality of the deep learning model, produce reliable translation results through the deep learning model, and improve translation efficiency.

[0115] Figure 8 This is a structural block diagram of a text translation device provided in an embodiment of the present application. The device is configured to execute the text translation method provided in the above embodiment and has the corresponding functional modules and beneficial effects of the execution method. Figure 8 As shown, the device specifically includes:

[0116] An information acquisition module 101 is configured to acquire a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task;

[0117] The first translation module 102 is configured to input the text to be translated and the language pair into the trained deep learning model to obtain the model translation text corresponding to the target language;

[0118] The second translation module 103 is configured to search for translation corpora in the corresponding source language that match the to-be-translated text in a set terminology corpus when the score index corresponding to the model translation text is lower than a preset threshold, and generate a plurality of candidate translation texts based on the translation corpus;

[0119] The target text determination module 104 is configured to determine a target translation text that meets the optimal condition of the scoring index from a plurality of candidate translation texts and the model translation text.

[0120] In the above, by obtaining the text to be translated and the language pair, the language pair is used to indicate the source language and the target language of the current translation task; the text to be translated and the language pair are input into the trained deep learning model to obtain the model translation text corresponding to the target language; when the scoring index corresponding to the model translation text is lower than the preset threshold, the translation corpus of the corresponding source language matching the text to be translated is retrieved from the set terminology corpus, and multiple candidate translation texts are generated based on the translation corpus; from multiple candidate translation texts and model translation texts, the target translation text that meets the optimal conditions of the scoring index is determined. The scoring index is set to test the preliminary translation results of the deep learning model, and the translation quality of the current deep learning model is effectively judged; by introducing a terminology corpus suitable for professional terminology and specific context settings when the model translation text does not meet the standards, multiple candidate translation texts are generated based on the terminology corpus, and a reference translation result can be provided; by screening the target translation text that meets the optimal conditions of the scoring index from multiple candidate translation texts and model translation texts, the accuracy of the translation text can be improved and the semantic deviation of the translation result can be reduced.

[0121] In a possible embodiment, the text to be translated includes at least one sentence to be translated;

[0122] The second translation module 103 is further configured to:

[0123] Based on the first grammatical rule corresponding to the source language, each sentence to be translated is decomposed into multiple phrases to be translated;

[0124] Retrieving multiple source language phrases that meet a preset similarity condition and correspond to each phrase to be translated in a set terminology corpus, and extracting multiple target language phrases that conform to the target language from the multiple language phrases that respectively correspond to the multiple source language phrases;

[0125] According to a second grammar rule corresponding to the target language, a plurality of target language phrases are combined to determine a plurality of candidate sentences corresponding to each sentence to be translated;

[0126] Multiple candidate sentences corresponding to each sentence to be translated are combined to generate multiple candidate translation texts.

[0127] In a possible embodiment, the second translation module 103 is further configured to:

[0128] Each phrase to be translated is vectorized to obtain multiple vectors to be processed;

[0129] Calculate the similarity between each vector to be processed and the source vector corresponding to the source language phrase in the set term corpus;

[0130] The source language phrases corresponding to the source vectors whose similarity is within a preset range are determined as phrases matching each phrase to be translated.

[0131] In a possible embodiment, it further includes a first corpus updating module configured to:

[0132] Selecting a first preset number of texts from the plurality of candidate translation texts as first translation texts to be reviewed for submission, so as to manually review the first translation texts to be reviewed;

[0133] A first manual review result and a first manual correction result of the first translation text to be reviewed are obtained. If there is no unrecorded translation error type in the first manual review result and the translation error rate does not reach a preset threshold, the terminology corpus is updated according to the first manual correction result.

[0134] In a possible embodiment, it further includes a second corpus updating module configured to:

[0135] If there are unrecorded translation error types in the first manual review result, and / or the translation error rate reaches a preset threshold, a second preset number of texts are selected from the remaining multiple candidate translation texts as second translation texts to be reviewed for submission, so as to perform manual review on the second translation texts to be reviewed;

[0136] A second manual correction result of the second translation text to be reviewed is obtained, and the terminology corpus is updated according to the first manual correction result and the second manual correction result.

[0137] In a possible embodiment, a third corpus updating module is further included, configured to:

[0138] Extracting terms from multiple candidate translation texts to obtain term texts to be reviewed;

[0139] Submit the terminology text to be reviewed for manual review;

[0140] A third manual correction result of the terminology text to be reviewed is obtained, and the terminology corpus is updated according to the third manual correction result.

[0141] In a possible embodiment, a model updating module is further included, configured as follows:

[0142] The deep learning model is trained based on the updated terminology corpus to obtain an optimized deep learning model.

[0143] Fig. 9 A structural diagram of a text translation device provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the device includes a processor 201, a memory 202, an input device 203 and an output device 204; the number of processors 201 in the device can be one or more. Fig. 9 A processor 201 is taken as an example; the processor 201, memory 202, input device 203 and output device 204 in the device can be connected by a bus or other means. Fig. 9 The example of connecting through a bus is taken. The memory 202, as a computer-readable storage medium, can be configured to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the text translation method in the embodiment of the present application. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 202, that is, implements the above-mentioned text translation method. The input device 203 can be configured to receive input digital or character information, and generate key signal input related to user settings and function control of the device. The output device 204 may include a display device such as a display screen.

[0144] The text translation device provided above can be used to execute the text translation method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0145] An embodiment of the present application also provides a non-volatile storage medium containing computer executable instructions, which, when executed by a computer processor, is configured to execute a text translation method described in the above embodiment, which includes: obtaining a text to be translated and a language pair, the language pair being used to indicate a source language and a target language of a current translation task; inputting the text to be translated and the language pair into a trained deep learning model to obtain a model translation text corresponding to the target language; when a scoring index corresponding to the model translation text is lower than a preset threshold, retrieving a translation corpus in the corresponding source language that matches the text to be translated from a set terminology corpus, and generating multiple candidate translation texts based on the translation corpus; and determining a target translation text that meets the optimal conditions for the scoring index from the multiple candidate translation texts and the model translation text.

[0146] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.

[0147] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the above text translation method, can also execute related operations in the text translation method provided in any embodiment of the present application.

[0148] It is worth noting that in the above-mentioned embodiment of the text translation system, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not configured to limit the protection scope of the embodiments of the present application.

[0149] It should be noted that the numbering of each step in this scheme is only used to describe the overall design framework of this scheme, and does not represent the necessary order relationship between the steps. On the basis that the overall implementation process conforms to the overall design framework of this scheme, it belongs to the protection scope of this scheme, and the order of precedence in the form of text when describing is not an exclusive limitation on the specific implementation process of this scheme. It should be understood by those skilled in the art that the embodiments of the present application can be provided as methods, systems, or computer program products. In a typical configuration, a computing device includes one or more processors (CPU), an input / output interface, a network interface, and a memory. The memory may include non-permanent memory in a computer-readable medium, a random access memory (RAM) and / or a non-volatile memory in the form of a read-only memory (ROM) or a flash memory (fl ash RAM). The memory is an example of a computer-readable medium.

[0150] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0151] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A text translation method, characterized in that: include: Acquire a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task, wherein the text to be translated includes at least one sentence to be translated; Inputting the text to be translated and the language pair into the trained deep learning model to obtain a model translated text corresponding to the target language; In the case where the score index corresponding to the model translation text is lower than a preset threshold, a translation corpus corresponding to the source language and matching the text to be translated is retrieved from a set terminology corpus, wherein the method includes, based on a first grammatical rule corresponding to the source language, decomposing each sentence to be translated to obtain a plurality of phrases to be translated, retrieving a plurality of source language phrases corresponding to each phrase to be translated that meet a preset similarity condition in the set terminology corpus, and extracting a plurality of target language phrases that conform to the target language from a plurality of language phrases corresponding to the plurality of source language phrases respectively; generating a plurality of candidate translation texts based on the translation corpus, wherein the method includes, based on a second grammatical rule corresponding to the target language, combining the plurality of target language phrases to determine a plurality of candidate sentences corresponding to each sentence to be translated, and combining the plurality of candidate sentences corresponding to each sentence to be translated to generate a plurality of candidate translation texts; A target translation text that meets an optimal condition of a scoring index is determined from the multiple candidate translation texts and the model translation text.

2. The text translation method according to claim 1, characterized in that: The step of searching the set term corpus for a plurality of source language phrases corresponding to each of the phrases to be translated and meeting a preset similarity condition includes: Vectorizing each of the phrases to be translated to obtain a plurality of vectors to be processed; Calculate the similarity between each of the vectors to be processed and the source vector corresponding to the source language phrase in the set term corpus; The source language phrases corresponding to the source vectors whose similarity is within a preset range are determined as phrases matching each of the phrases to be translated.

3. The text translation method according to claim 1, characterized in that: After generating a plurality of candidate translation texts based on the translation corpus, the method further includes: Selecting a first preset number of texts from the plurality of candidate translation texts as first translation texts to be reviewed for submission, so as to manually review the first translation texts to be reviewed; A first manual review result and a first manual correction result of the first translation text to be reviewed are obtained. If there is no unrecorded translation error type in the first manual review result and the translation error rate does not reach a preset threshold, the terminology corpus is updated according to the first manual correction result.

4. The text translation method according to claim 3, characterized in that: Also includes: If there are unrecorded translation error types in the first manual review result, and / or the translation error rate reaches a preset threshold, a second preset number of texts are selected from the remaining plurality of candidate translation texts as second translation texts to be reviewed, so as to perform manual review on the second translation texts to be reviewed; A second manual correction result of the second translation text to be reviewed is obtained, and the terminology corpus is updated according to the first manual correction result and the second manual correction result.

5. The text translation method according to claim 1, characterized in that: After generating a plurality of candidate translation texts based on the translation corpus, the method further includes: Extracting terminology from the plurality of candidate translation texts to obtain terminology texts to be reviewed; Submit the terminology text to be reviewed for manual review; A third manual correction result of the terminology text to be reviewed is obtained, and the terminology corpus is updated according to the third manual correction result.

6. The text translation method according to any one of claims 3 to 5, characterized in that: After the updating of the term corpus, the method further includes: The deep learning model is trained based on the updated terminology corpus to obtain the optimized deep learning model.

7. A text translation device, characterized in that: include: An information acquisition module, configured to acquire a text to be translated and a language pair, wherein the language pair is used to indicate a source language and a target language of a current translation task, wherein the text to be translated includes at least one sentence to be translated; A first translation module is configured to input the text to be translated and the language pair into a trained deep learning model to obtain a model translation text corresponding to the target language; The second translation module is configured to retrieve a translation corpus corresponding to the source language and matching the text to be translated from a set terminology corpus when the score index corresponding to the model translation text is lower than a preset threshold, wherein the module includes, based on a first grammatical rule corresponding to the source language, decomposing each sentence to be translated to obtain a plurality of phrases to be translated, retrieving a plurality of source language phrases corresponding to each phrase to be translated that meet a preset similarity condition from the set terminology corpus, extracting a plurality of target language phrases that conform to the target language from a plurality of language phrases corresponding to the plurality of source language phrases respectively; generating a plurality of candidate translation texts based on the translation corpus, wherein the module includes, based on a second grammatical rule corresponding to the target language, combining the plurality of target language phrases to determine a plurality of candidate sentences corresponding to each sentence to be translated, and combining the plurality of candidate sentences corresponding to each sentence to be translated to generate a plurality of candidate translation texts; The target text determination module is configured to determine a target translation text that meets the optimal condition of the scoring index from the multiple candidate translation texts and the model translation text.

8. A text translation device, comprising: one or more processors; The storage device is configured to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the text translation method according to any one of claims 1 to 6.

9. A non-volatile storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute the text translation method according to any one of claims 1 to 6 when executed by a computer processor.

Citation Information

Patent Citations

  • Statistical machine translation method and system based on dependency tree

    CN104239290A

  • Spoken language instant translation method and system

    CN108460027A

  • Computer-aided translation method and device

    CN111652006A

  • Multi-language term recognition and bilingual term alignment method

    CN114357975A

  • Translation system and text translation, downloading, quality checking and editing method

    CN114692655A