Text translation method, text translation device and storage medium

By identifying and replacing target entity words and their abbreviations in the text to be translated, and using a translation model, the entity consistency problem in machine translation is solved, improving the accuracy and coherence of the translation.

CN113239707BActive Publication Date: 2024-11-05BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110226769.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-01
Publication Date
2024-11-05
Estimated Expiration
2041-03-01

AI Technical Summary

Technical Problem

Existing machine translation technology struggles to ensure consistency in the translation of the same entity and its abbreviations when processing multi-sentence texts, resulting in incoherent and inefficient translations, especially when the text contains entities and abbreviations.

Method used

By identifying target entity words and their abbreviations in the text to be translated, all of them are replaced with target entity words, and a translation model is used to translate them, ensuring that the entity words and their abbreviations have the same translation results.

Benefits of technology

This achieves consistency in the translation of the same entity and its abbreviations, improving the accuracy and coherence of the translation and enhancing the efficiency of machine translation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113239707B_ABST
    Figure CN113239707B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a text translation method, a text translation device and a storage medium. The text translation method comprises: obtaining a text to be translated, and identifying target entity words included in the text to be translated, and abbreviations corresponding to the target entity words; replacing all the abbreviations with the target entity words to obtain a first text corresponding to the text to be translated; and determining the translation result of the text to be translated based on the first text. Through the embodiments of the present disclosure, the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words can have the same translation result, ensuring the consistency of the translation of the target entity words and their abbreviations in the text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of language processing technology, and in particular to a text translation method, a text translation device and a storage medium. Background Art

[0002] With the frequent international cooperation and exchanges, the translation industry has encountered great challenges in terms of translation quality and efficiency. With the rapid development of artificial intelligence, the huge potential of machine translation in the translation industry has gradually emerged. Machine translation uses computers to convert one natural language into another. With the support of large-scale training data, machine translation has achieved high quality and made great breakthroughs in accuracy. In some areas, it can already reach a level comparable to human translation.

[0003] However, in some practical translation applications, there are still some problems. For a text content including multiple sentences, it is necessary to ensure that the same entity referring to the same object remains consistent during translation. Current machine translations often break the text into single sentences and translate them sentence by sentence. Therefore, the same entity may have different translations in different sentences, resulting in incoherent translations and inconsistent entity translations. In particular, when entities and their abbreviations exist in the same text, the phenomenon of inconsistent translation is more serious, resulting in low machine translation efficiency and poor translation results. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a text translation method, a text translation device and a storage medium.

[0005] According to one aspect of an embodiment of the present disclosure, a text translation method is provided, which includes: obtaining a text to be translated, and identifying target entity words included in the text to be translated, and abbreviations corresponding to the target entity words; replacing all the abbreviations with the target entity words to obtain a first text corresponding to the text to be translated; and determining a translation result of the text to be translated based on the first text.

[0006] In some embodiments, based on the first text, determining the translation result of the text to be translated includes: replacing the target entity word in the first text with the same replacement symbol to obtain a second text corresponding to the text to be translated; translating other texts in the second text except the replacement symbol to obtain a first translation result, and translating the target entity word to obtain a translation result of the target entity word; replacing the replacement symbol in the first translation result with the translation result of the target entity word to obtain a final translation result of the text to be translated.

[0007] In some embodiments, the identifying of the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words includes: determining rules for identifying the target entity words and the abbreviations corresponding to the target entity words; and based on the rules, identifying the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words.

[0008] In some embodiments, the identifying of the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words includes: determining the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words based on a reference resolution model, and / or determining the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words based on the correspondence between entity words and abbreviations.

[0009] In some embodiments, the target entity words include names, and the names include first-type names and second-type names, and the names include a first part and a second part; the identifying the target entity words included in the text to be translated, and the abbreviations corresponding to the target entity words, includes: determining the names included in the text to be translated based on a regular expression for determining names; if the names are names of the first type, and the first part of the names of the first type exists in the text to be translated, determining that the abbreviations corresponding to the names of the first type are identified; if the names are names of the second type, and the second part of the names of the second type exists in the text to be translated, determining that the abbreviations corresponding to the names of the second type are identified.

[0010] According to another aspect of an embodiment of the present disclosure, a text translation device is provided, comprising: an acquisition module for acquiring a text to be translated; an identification module for identifying target entity words included in the text to be translated, and abbreviations corresponding to the target entity words; a determination module for replacing all the abbreviations with the target entity words to obtain a first text corresponding to the text to be translated, and determining a translation result of the text to be translated based on the first text.

[0011] In some embodiments, the determination module determines the translation result of the text to be translated based on the first text in the following manner: replace the target entity word in the first text with the same replacement symbol to obtain a second text corresponding to the text to be translated; translate other texts in the second text except the replacement symbol to obtain a first translation result, and translate the target entity word to obtain a translation result of the target entity word; replace the replacement symbol in the first translation result with the translation result of the target entity word to obtain a final translation result of the text to be translated.

[0012] In some embodiments, the recognition module recognizes the target entity words and the abbreviations corresponding to the target entity words included in the text to be translated in the following manner: determining rules for recognizing the target entity words and the abbreviations corresponding to the target entity words; based on the rules, recognizing the target entity words and the abbreviations corresponding to the target entity words included in the text to be translated.

[0013] In some embodiments, the recognition module identifies the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words in the following manner: based on a reference resolution model, determining the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words, and / or based on the correspondence between entity words and abbreviations, determining the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words.

[0014] In some embodiments, the target entity words include names, and the names include first-type names and second-type names, and the names include a first part and a second part; the recognition module recognizes the target entity words included in the text to be translated, and the abbreviations corresponding to the target entity words in the text to be translated, including: determining the names included in the text to be translated based on a regular expression for determining names; if the names are names of the first type, and the first part of the names of the first type exists in the text to be translated, determining that the abbreviations corresponding to the names of the first type are recognized; if the names are names of the second type, and the second part of the names of the second type exists in the text to be translated, determining that the abbreviations corresponding to the names of the second type are recognized.

[0015] According to another aspect of an embodiment of the present disclosure, a text translation device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to: execute any one of the aforementioned text translation methods.

[0016] According to another aspect of the embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal can execute any of the aforementioned text translation methods.

[0017] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: through the embodiments of the present disclosure, a text to be translated is obtained, and target entity words and abbreviations corresponding to the target entity words included in the text to be translated are identified, all abbreviations in the text to be translated are replaced with target entity words, and the replaced text to be translated is translated. By replacing the abbreviations, the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words can have the same translation results, thereby ensuring the consistency of the translation of the target entity words and their abbreviations in the text.

[0018] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0020] Figure 1 The figure is a flowchart of a text translation method according to an exemplary embodiment of the present disclosure.

[0021] Figure 2 The figure is a flowchart showing a method for determining a translation result of a text to be translated according to an exemplary embodiment of the present disclosure.

[0022] Figure 3 The present invention is a flowchart of a method for identifying a target entity word and an abbreviation corresponding to the target entity word according to an exemplary embodiment of the present invention.

[0023] Figure 4 The figure is a block diagram of a text translation device according to an exemplary embodiment of the present disclosure.

[0024] Figure 5 A block diagram of a device for text translation is shown according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0026] Machine translation, also known as automatic translation, is a method of using computers to convert a natural language, namely the source language, into another natural language, namely the target language. With the support of large-scale training data, machine translation has achieved high quality and made great breakthroughs in accuracy. In some areas, it can already reach a level comparable to human translation. There are two types of machine translation research methods: rule-based and statistical. Due to the long development cycle of the rule system and the large demand for funds and manpower, the rule system has made slow progress. Relatively speaking, the statistical method has advantages such as a short development cycle and the convenience of processing large-scale corpus. Among the statistical machine translation methods, the phrase-based translation method has been fully developed.

[0027] In some practical translation applications, there are still some problems. For a text content including multiple sentences, it is necessary to ensure that the same entity referring to the same object appears in it remains consistent during translation. Current machine translation mostly breaks the text into single sentences and translates them sentence by sentence.

[0028] For example, in some possible implementations, a data y=[y1, y2, ..., yn] is extracted from a large amount of Chinese monolingual text data Y, where n represents the n clauses included in the text data Y. Based on the Chinese-English translation model, the translation result of data y at the sentence level is x, where x=[x1, x2, ..., xn]. Using the English-Chinese translation model, the translation result of data x is y', where y'=[y1', y2', ..., yn']. The translation model is trained with (y', y) to ensure entity translation consistency.

[0029]

[0030]

[0031] The above table shows the translation obtained when the English text is translated into Chinese using the translation model. The English text to be translated includes two sentences. Through the reading analysis of the text, it can be seen that "Chen Wei" in the first sentence and "Chen" in the second sentence refer to the same object, and "Chen" in the second sentence is the abbreviation of "Ch en Wei" in the first sentence. However, based on the translation model at the sentence level translation, "Chen Wei" and "Chen" generate different translations in the Chinese translation. In order to ensure the consistency of the translation of personal names, modeling can be based on the text translation model. For example, the first sentence is used as the source document content (Source Document Context) and the second sentence is decoded, that is, the source current sentence (Source Current Sentence). When modeling the second sentence, context information is introduced to guide the translation model to maintain coherence with the part of the generated translation when generating the translation, and consistency with the translation of related entities. However, when the model does not learn sufficient context information, the text modeling method still cannot guarantee the consistency of the translation results of personal names and their abbreviations.

[0032] Therefore, the present disclosure provides a text translation method, which obtains a text to be translated, identifies target entity words and abbreviations corresponding to the target entity words included in the text to be translated, and replaces all abbreviations in the text to be translated with the target entity words. By replacing the abbreviations, the entity words and the abbreviations corresponding to the entity words can have the same translation results.

[0033] Figure 1 is a flowchart of a text translation method according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the text translation method includes the following steps.

[0034] In step S101, a text to be translated is obtained, and target entity words and abbreviations corresponding to the target entity words included in the text to be translated are identified.

[0035] In step S102, all abbreviations are replaced with target entity words to obtain a first text corresponding to the text to be translated.

[0036] In step S103, a translation result of the text to be translated is determined based on the first text.

[0037] In the disclosed embodiments, the text translation method can be applied to various types of electronic devices, and the electronic devices can be mobile devices and fixed devices. The mobile devices can be mobile phones, tablet computers, etc., and the fixed devices include personal computers, smart handheld assistants, etc. The text translation method can also be applied to terminal applications or web pages. The text to be translated can be a text including multiple sentences, such as a chapter text, etc. The text to be translated includes a target entity word, which can be a name of a person, a place name, an institution, a proper noun, a term or an organization.

[0038] In the disclosed embodiment, when translating a text to be translated, the text to be translated is obtained, and the text to be translated includes a target entity word and an abbreviation corresponding to the target entity word. For example, the text to be translated is an English language text, including two sentences, namely, "A year later, Dr. Chen Wei was ordered to help the country build a subway. Her husband said when they were told a frame of Chen was aired on a night TV show, he was surprised". The target entity word of the text to be translated is the name "Chen Wei", and the abbreviation corresponding to it is "Chen". The abbreviation "Chen" in the text to be translated is completely replaced with the target entity word "Chen Wei" corresponding to the abbreviation "Chen", and the first text corresponding to the text to be translated is obtained. It can be seen that all "Chen" in the first text is replaced with "Chen Wei". The above-mentioned first text is "A year later, Dr. Chen Wei was ordered to help the country build a subway. Her husband said when they were told a frame of Chen Wei was aired on a night TV show, he was surprised". By replacing, the target entity words and the abbreviations corresponding to the target entity words included in the text to be translated are kept consistent. When translating the first text after replacement, it can be translated using a translation model, and the translation model can be a neural network model, for example, based on a convolutional neural network model (CNN), a recurrent neural network model (RNN) or a long short-term memory system (LSTM) and the like, and the disclosed embodiment does not limit this. After translation, a translation result of the text to be translated is obtained.

[0039] According to an embodiment of the present disclosure, by obtaining a text to be translated and identifying target entity words and abbreviations corresponding to the target entity words included in the text to be translated, all abbreviations in the text to be translated are replaced with target entity words, and the replaced text to be translated is translated. By replacing the abbreviations, the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words can have the same translation results, thereby ensuring the consistency of the translation of the target entity words and their abbreviations in the text.

[0040] Figure 2 is a flowchart of a method for determining a translation result of a text to be translated according to an exemplary embodiment of the present disclosure. Figure 2 As shown, the method for determining the translation result of the text to be translated includes the following steps.

[0041] In step S201, the target entity word in the first text is replaced with the same replacement symbol to obtain a second text corresponding to the text to be translated.

[0042] In step S202, the other texts in the second text except the replacement symbol are translated to obtain a first translation result, and the target entity word is translated to obtain a translation result of the target entity word.

[0043] In step S203, the replacement symbol in the first translation result is replaced with the translation result of the target entity word to obtain a final translation result of the text to be translated.

[0044] In an embodiment of the present disclosure, when translating a text to be translated, the text to be translated is obtained, and the text to be translated includes a target entity word, and the text to be translated also includes an abbreviation corresponding to the target entity word. All the abbreviations corresponding to the target entity words in the text to be translated are replaced with the target entity words to obtain a first text corresponding to the text to be translated. All the target entity words in the first text are replaced with the same replacement symbol to obtain a second text corresponding to the text to be translated. It can be understood that the text to be translated, the first text corresponding to the text to be translated, and the second text corresponding to the text to be translated have a corresponding relationship.

[0045] Still taking the above text to be translated as an example, the text to be translated is an English text, "A year later, Dr. Chen Wei was ordered to help the country build a subway. Her husband said when they were told a frame of Chen was aired on a night TV show, he was surprised". The target entity word in the text to be translated is "Chen Wei", and the abbreviation corresponding to "Chen Wei" is "Chen". The first text corresponding to the text to be translated is "A year later, Dr. Chen Wei was ordered to help the country build a subway. Her husband said when they were told a frame of Chen Wei was aired on a night TV show, he was surprised". The two target entity words "Chen Wei" in the first text are replaced with the same replacement symbol "$tag" to obtain the second text corresponding to the text to be translated. That is, the second text is "A year later, Dr. $tag was ordered to help the country build a subway. Her husband said when they were told a frame of $tag was aired on a night TV show, he was surprised". Translate the other texts in the second text except the replacement symbol into Chinese from English, and obtain the first translation result, that is, the first translation result is "A year later, Dr. $tag was ordered to help the country build a subway. Her husband said that he was surprised when they were told that a frame of $tag was broadcast on a nightly TV program." Translate the target entity word "ChenWei" to obtain the translation result of the target entity word "Chen Wei". Replace the replacement symbol $tag in the first translation result with the translation result of the target entity word to obtain the final translation result of the text to be translated. The translation result corresponding to the text to be translated is "A year later, Dr. Chen Wei was ordered to help the country build a subway. Her husband said that he was surprised when they were told that a frame of Chen Wei was broadcast on a nightly TV program", ensuring the consistency of the translation of the target entity words and the abbreviations corresponding to the target entity words in the text.

[0046] According to an embodiment of the present disclosure, a target entity word in a first text is replaced with the same replacement symbol to obtain a second text corresponding to the text to be translated, other texts in the second text except the replacement symbol are translated to obtain a first translation result, and the target entity word is translated to obtain a translation result of the target entity word; the replacement symbol in the first translation result is replaced with the translation result of the target entity word to obtain a final translation result of the text to be translated, and the replacement of abbreviations can make the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words have the same translation results, thereby ensuring the consistency of the translation of the target entity words and their abbreviations in the text.

[0047] Figure 3 is a flowchart of a method for identifying a target entity word and an abbreviation corresponding to the target entity word according to an exemplary embodiment of the present disclosure. Figure 3 As shown, the method for identifying a target entity word and an abbreviation corresponding to the target entity word includes the following steps.

[0048] In step S301 , a rule for identifying a target entity word and an abbreviation related to the target entity word is determined.

[0049] In step S302, target entity words and abbreviations corresponding to the target entity words included in the text to be translated are identified based on the rules.

[0050] In the disclosed embodiment, when the text to be translated is translated, the text to be translated is obtained, and the text to be translated includes the target entity word, and the text to be translated also includes the abbreviation corresponding to the target entity word. For example, when the target entity word is a name, the name can be a Chinese name or a foreign name, and the Chinese name or the foreign name is composed of a surname and a given name. When the text to be translated is an English text, the first letter of each part of the English expression of the name is in capital form. The composition of Chinese names is generally the surname first and the given name second, such as the Chinese name "Li Lei" in the English text, "Li" is the surname, and "Lei" is the given name. The composition of foreign names is generally the given name first and the surname second, for example, the foreign name "Jim Green" in the English text, "Green" is the surname, and "Jim" is the given name. Determine the rules for identifying the abbreviations of the target entity words included in the text to be translated, for example, it can be to formulate a regular expression, "[English name / Chinese surname][AZ][az]+". Regular expressions are a kind of filtering logic formula for string operations using some pre-defined specific characters and combinations of these specific characters to form a "regular string". The regular expression in the embodiment of the present disclosure treats the translation text and extracts Chinese names or foreign names that match the regular expression from the text to be translated. When the target entity word is a name, the name may include a first type of name and a second type of name; no matter what type of name, the name may include two parts, namely a first part and a second part; it can be understood that the first type of name may be a Chinese name, and the second type of name may be an English name. There are certain differences in the formats corresponding to names in different languages. When the name is a Chinese name, the first part includes a Chinese surname, and the second part includes a Chinese name; when the name is an English name, the first part includes an English name, and the second part includes an English surname. Therefore, after identifying the full name of a person, it is necessary to first determine the type of the name, and then determine the corresponding part of its abbreviation according to the type of the name.

[0051] Based on the regular expression, the names included in the text to be translated are determined. If the name is a first type of name, such as a Chinese name, and the first part of the Chinese name exists in the text to be translated, it is determined that the abbreviation corresponding to the Chinese name is recognized. If the name is a second type of name, such as an English name, and the second part of the English name exists in the text to be translated, it is determined that the abbreviation corresponding to the English name is recognized. In one example, when the text to be translated is an English text, it is determined based on the above regular expression that the name "Chen Wei" is included in the text to be translated. Further, it is determined whether the recognized name, that is, whether there is a surname of a Chinese name in the two parts that make up the name, to determine whether the recognized name is a Chinese name or a foreign name. The abbreviation of a Chinese name is the first part of the name, and the abbreviation of a foreign name is the second part of the name. For example, the abbreviation of the Chinese name "Li Lei" in the English text to be translated is "Li", and the abbreviation of the foreign name "Jim Green" in the English text to be translated is "Green". For the English text to be translated in the above example, based on the regular expression, the name "Chen Wei" is identified in the text to be translated, and based on the rule, the abbreviation of the name "Chen Wei", namely "Chen", is determined. All the abbreviations "Chen" corresponding to the name in the text to be translated are replaced with the name "Chen Wei" to obtain the first text corresponding to the text to be translated. By replacing, the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words are kept consistent, and the first text after replacement is translated to obtain the translation result.

[0052] It is understandable that the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words can also be automatically identified using a named entity recognition tool. The named entity recognition tool can be trained based on sentences including words of different parts of speech.

[0053] According to the embodiments of the present disclosure, rules for identifying target entity words and abbreviations of the target entity words included in the text to be translated are determined, and based on the determined rules, the target entity words and abbreviations corresponding to the target entity words included in the text to be translated are identified, which can ensure that the target entity words and the abbreviations corresponding to the target entity words are accurately identified, ensure the consistency of the translation of the target entity words and their abbreviations in the text, and improve the quality of text translation.

[0054] In an embodiment of the present disclosure, the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words are determined based on a reference resolution model. The reference resolution model is used to analyze word sequences, perform target replacements on the reference words and invisible references in the segmentation results, and improve the semantic structure of the sentence. When determining the target entity words included in the text to be translated based on the reference resolution model, the text to be translated is segmented, and all entity words in the text to be translated can be determined by an entity recognition model, and there can be multiple entity words. For the multiple entity words identified, a word pair is constructed for every two entity words, and a binary classification model is used to determine whether the word pair constructed by the two entity words refers to the same entity. Taking the text to be translated "The World Health Organization (WHO) is a specialized agency of the United Nations responsible for international public health" as an example, the text is segmented, and the entity recognition model is used to identify multiple entities included in the text, namely "World Health Organization", "WHO" and "the United Nations". The above-mentioned two entities form a word pair, and the word pair is constructed by the entity recognition model.<World Health Organization,WHO> ,<World Health Organization,the United Nations> Input the binary classification model and judge<WorldHealth Organization, WHO> Refers to the same entity, WHO is the abbreviation of World Health Organization.

[0055] According to the embodiments of the present disclosure, based on the reference resolution model, the target entity words and the abbreviations corresponding to the target entity words included in the text to be translated are determined, which can ensure the effective recognition of the target entity words and the abbreviations corresponding to the target entity words in various scenarios and categories, ensure the consistency of the translation of the target entity words and their abbreviations in the text, and improve the quality of text translation.

[0056] In the disclosed embodiment, a correspondence between a target entity word and an abbreviation corresponding to the target entity word is created. When determining the target entity word and the abbreviation corresponding to the target entity word included in the text to be translated, the correspondence is used to determine the target entity word included in the text to be translated, and the abbreviation corresponding to the target entity word is determined. For example, creating a correspondence between a target entity word and an abbreviation corresponding to the target entity word can be to create a table representing the correspondence, through which the target entity word and the abbreviation corresponding to the target entity word can be obtained. The correspondence can include the full English name of a personal computer, Personal Computer, and the abbreviation PC corresponding to Personal Computer. It also includes the full English name of the World Health Organization, World Health Organization, and the abbreviation WHO corresponding to World Health Organization. For the text to be translated, "The World Health Organization is a specialized agency of the United Nations responsible for international public health. The WHO Constitution, which establishes the agency's governing structure and principles, states its main objective as "the attainment by all peoples of the highest possible level of health", the World Health Organization and its corresponding abbreviation WHO included in the text to be translated are determined based on the correspondence between entity words and abbreviations.

[0057] According to the embodiments of the present disclosure, based on the correspondence between entity words and abbreviations, the target entity words and the abbreviations corresponding to the target entity words included in the text to be translated are determined, which can ensure the effective recognition of target entity words and abbreviations corresponding to the target entity words in various scenarios and categories, ensure the consistency of the translation of the target entity words and their abbreviations in the text, and improve the quality of text translation.

[0058] In the disclosed embodiment, the target entity word may be a person's name, for example, when the text to be translated is an English text, when the English text is translated from English to Chinese, the Chinese name, foreign name, etc. included in the text. It can be understood that the target entity word may also be a place name, institution, proper noun, term or organization name.

[0059]

[0060] The above table shows the process of text translation using the text translation of the embodiment of the present disclosure. The text to be translated is an English text, including two sentences, "A year later, Dr. Chen Wei was ordered to help the country build a subway" and "Her husband said when they were told a frame of Chen was aired on a night TV show, he was surprised". The target entity word included in the text to be translated is identified as "Chen Wei", and the abbreviation corresponding to "Chen Wei" is "Chen". "Chen Wei" and "Chen" are identified in the text to be translated. The abbreviation "Chen" in the text to be translated is completely replaced with the target entity word "Chen Wei" corresponding to the abbreviation "Chen", and the first text corresponding to the text to be translated is obtained. It can be seen that the first text corresponding to the above text to be translated is "A year later, Dr. Chen Wei was ordered to help the country build a subway. Her husband said when they were told a frame of Chen Wei was aired on a night TV show, he was surprised". The two target entity words "Chen Wei" in the first text are replaced with the same replacement symbol "$tag" to obtain the second text corresponding to the text to be translated. That is, the second text is "A year later, Dr. $tag was ordered to help the country build a subway. Her husband said when they were told a frame of $tag was aired on a night TV show, he was surprised". The other texts in the second text except the replacement symbol are translated from English to Chinese to obtain the first translation result, that is, the first translation result is "A year later, Dr. $tag was ordered to help the country build a subway. Her husband said when they were told a frame of $tag was aired on a night TV show, he was surprised". The target entity word "Chen Wei" is translated to obtain the translation result of the target entity word "Chen Wei". The replacement symbol in the first translation result is replaced with the translation result of the target entity word to obtain the final translation result of the text to be translated.The corresponding translation result of the text to be translated is "A year later, Dr. Chen Wei was ordered to help the country build a subway. Her husband said he was surprised when they were told that a frame of Chen Wei was broadcast on a nightly TV program", ensuring the consistency of the translation of the target entity words in the text and the abbreviations corresponding to the target entity words.

[0061] According to an embodiment of the present disclosure, a target entity word in a first text is replaced with the same replacement symbol to obtain a second text corresponding to the text to be translated, other texts in the second text except the replacement symbol are translated to obtain a first translation result, and the target entity word is translated to obtain a translation result of the target entity word; the replacement symbol in the first translation result is replaced with the translation result of the target entity word to obtain a final translation result of the text to be translated, and the replacement of abbreviations can make the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words have the same translation results, thereby ensuring the consistency of the translation of the target entity words and their abbreviations in the text.

[0062] Figure 4 is a block diagram of a text translation device according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the text translation device 100 includes: an acquisition module 101 , a recognition module 102 and a determination module 103 .

[0063] The acquisition module 101 is used to acquire the text to be translated.

[0064] The recognition module 102 is used to recognize target entity words included in the text to be translated and abbreviations corresponding to the target entity words.

[0065] The determination module 103 is used to replace all abbreviations with target entity words to obtain a first text corresponding to the text to be translated, and determine a translation result of the text to be translated based on the first text.

[0066] In some embodiments, the determination module 103 determines the translation result of the text to be translated based on the first text in the following manner:

[0067] The target entity word in the first text is replaced with the same replacement symbol to obtain a second text corresponding to the text to be translated;

[0068] Translate the other texts in the second text except the replacement symbol to obtain a first translation result, and translate the target entity word to obtain a translation result of the target entity word;

[0069] The replacement symbol in the first translation result is replaced with the translation result of the target entity word to obtain a final translation result of the text to be translated.

[0070] In some embodiments, the recognition module 102 recognizes the target entity words and the abbreviations corresponding to the target entity words included in the text to be translated in the following manner:

[0071] determining a rule for identifying a target entity word and an abbreviation corresponding to the target entity word;

[0072] Based on the rules, target entity words and abbreviations corresponding to the target entity words included in the text to be translated are identified.

[0073] In some embodiments, the recognition module 102 recognizes the target entity words and the abbreviations corresponding to the target entity words included in the text to be translated in the following manner:

[0074] Based on the reference resolution model, the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words are determined, and / or based on the correspondence between the entity words and the abbreviations, the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words are determined.

[0075] In some embodiments, the target entity words include names, and the names include first-type names and second-type names, and the names include a first part and a second part; the recognition module 102 recognizes the target entity words included in the text to be translated, and the abbreviations corresponding to the target entity words in the following manner: based on a regular expression for determining names, the names included in the text to be translated are determined; if the name is a first-type name, and the first part of the first-type name exists in the text to be translated, it is determined that the abbreviation corresponding to the first-type name is recognized; if the name is a second-type name, and the second part of the second-type name exists in the text to be translated, it is determined that the abbreviation corresponding to the second-type name is recognized.

[0076] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0077] Figure 5 1 is a block diagram of a device 200 for text translation according to an exemplary embodiment of the present disclosure. For example, the device 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0078] Reference Figure 5 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .

[0079] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.

[0080] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0081] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.

[0082] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0083] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.

[0084] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0085] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, and the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200, and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0086] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0087] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0088] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0089] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.

[0090] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.

[0091] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.

[0092] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.

[0093] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0094] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A text translation method, characterized in that: The text translation method comprises: Acquire a text to be translated, and identify target entity words included in the text to be translated, and abbreviations corresponding to the target entity words; Replace all the abbreviations with the target entity words to obtain a first text corresponding to the text to be translated; Determining a translation result of the text to be translated based on the first text; The step of determining a translation result of the text to be translated based on the first text includes: The target entity word in the first text is replaced by the same replacement symbol to obtain a second text corresponding to the text to be translated; Translating other texts in the second text except the replacement symbol to obtain a first translation result, and translating the target entity word to obtain a translation result of the target entity word; Replacing the replacement symbol in the first translation result with the translation result of the target entity word to obtain a final translation result of the text to be translated; The target entity word and the abbreviation exist simultaneously in the same text and are used to refer to the same entity of the same object; The target entity word includes a person's name, the person's name includes a first type of person's name and a second type of person's name, and the person's name includes a first part and a second part; In response to the text to be translated including a person's name, the identifying a target entity word included in the text to be translated and an abbreviation corresponding to the target entity word includes: Determine the name of a person included in the text to be translated based on a regular expression for determining the name of a person; If the name is a name of the first type, and the first part of the name of the first type exists in the text to be translated, determining that an abbreviation corresponding to the name of the first type is recognized; If the name is a name of the second type and the second part of the name of the second type exists in the text to be translated, it is determined that an abbreviation corresponding to the name of the second type is recognized.

2. The text translation method according to claim 1, characterized in that: The identifying target entity words included in the text to be translated and abbreviations corresponding to the target entity words includes: Determining a rule for identifying the target entity word and an abbreviation corresponding to the target entity word; Based on the rules, the target entity words and abbreviations corresponding to the target entity words included in the text to be translated are identified.

3. The text translation method according to claim 1, characterized in that: The identifying target entity words included in the text to be translated and abbreviations corresponding to the target entity words includes: Determine the target entity words and the abbreviations corresponding to the target entity words in the text to be translated based on the coreference resolution model, and / or Based on the correspondence between entity words and abbreviations, the target entity words and the abbreviations corresponding to the target entity words included in the text to be translated are determined.

4. A text translation device, characterized in that: The text translation device comprises: The acquisition module is used to obtain the text to be translated; A recognition module, used for recognizing target entity words included in the text to be translated, and abbreviations corresponding to the target entity words; A determination module, used to replace all the abbreviations with the target entity words, obtain a first text corresponding to the text to be translated, and determine a translation result of the text to be translated based on the first text; The determination module determines the translation result of the text to be translated based on the first text in the following manner: The target entity word in the first text is replaced by the same replacement symbol to obtain a second text corresponding to the text to be translated; Translating other texts in the second text except the replacement symbol to obtain a first translation result, and translating the target entity word to obtain a translation result of the target entity word; Replacing the replacement symbol in the first translation result with the translation result of the target entity word to obtain a final translation result of the text to be translated; The target entity word and the abbreviation exist simultaneously in the same text and are used to refer to the same entity of the same object; The target entity word includes a person's name, the person's name includes a first type of person's name and a second type of person's name, and the person's name includes a first part and a second part; In response to the text to be translated including a person's name, the recognition module recognizes a target entity word included in the text to be translated and an abbreviation corresponding to the target entity word in the following manner: Determine the name of a person included in the text to be translated based on a regular expression for determining the name of a person; If the name is a name of the first type, and the first part of the name of the first type exists in the text to be translated, determining that an abbreviation corresponding to the name of the first type is recognized; If the name is a name of the second type and the second part of the name of the second type exists in the text to be translated, it is determined that an abbreviation corresponding to the name of the second type is recognized.

5. The text translation device according to claim 4, characterized in that: The recognition module recognizes the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words in the following manner: Determining a rule for identifying the target entity word and an abbreviation corresponding to the target entity word; Based on the rules, the target entity words and abbreviations corresponding to the target entity words included in the text to be translated are identified.

6. The text translation device according to claim 4, characterized in that: The recognition module recognizes the target entity words included in the text to be translated and the abbreviations corresponding to the target entity words in the following manner: Determine the target entity words and the abbreviations corresponding to the target entity words in the text to be translated based on the coreference resolution model, and / or Based on the correspondence between entity words and abbreviations, the target entity words and the abbreviations corresponding to the target entity words included in the text to be translated are determined.

7. A text translation device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the text translation method described in any one of claims 1 to 3.

8. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute the text translation method according to any one of claims 1 to 3.