Translation method, device, equipment and medium
By identifying and querying proper nouns in the text to be translated, creating information groups and performing semantic matching, the accuracy problem of NMT in translating proper nouns such as personal names is solved, and the translation accuracy and translation quality are improved.
Patent Information
- Application Number
- CN202110681347.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-18
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-06-18
AI Technical Summary
Neural machine translation (NMT) has low accuracy when translating proper nouns such as people's names. This is mainly due to the scarcity and imbalance of training data, as well as the word selection bias of the model during decoding, resulting in the inability to accurately translate the words in the source language sentence according to the context. Proper nouns affect the accuracy of translation.
By identifying proper nouns in the text to be translated, querying multiple corresponding Chinese proper nouns and their attribute information, creating information groups, and selecting the Chinese proper nouns with the highest semantic matching as the target translation based on semantic matching.
It effectively improves the translation accuracy of pinyin names in other language texts and improves the quality of the translation.
Smart Images

Figure CN113361287B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of translation, and in particular to a translation method, device, equipment and medium. Background Art
[0002] Neural machine translation (NMT) is a technology that uses a neural network algorithm to automatically translate one language into another. It has become the most mainstream machine translation method and has broad technical and industrial value.
[0003] In the related technology, the accurate translation of proper nouns such as names of people plays a vital role in the quality of the translation. Although the translation quality of NMT has been significantly improved, the mistranslation rate of proper nouns is still high. There are two main reasons. On the one hand, due to the scarcity and imbalance of training data, as well as the bias in word selection of the model during decoding, the current NMT cannot accurately translate proper nouns such as names of people and places in the source language sentences according to the context, which seriously affects the accuracy of the translation. On the other hand, conventional NMT model training is based on sentence-level bilingual data, and it is impossible to directly translate longer complete texts, but can only split the text into sentences and then translate them independently. Therefore, each sentence is separated, and NMT cannot use other contextual texts outside the current source language sentence to be translated to accurately translate ambiguous proper nouns. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a translation method, device, equipment and medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a translation method is provided, which is applied to a translation device, and the method includes:
[0006] identifying a first proper noun in the text to be translated, wherein the first proper noun is in a Chinese pinyin format;
[0007] According to the first proper noun, searching for a plurality of second proper nouns corresponding to the first proper noun and attribute information associated with each of the second proper nouns, wherein the second proper nouns are in Chinese character format;
[0008] Based on a plurality of the second proper nouns, creating an information group corresponding to each of the second proper nouns, each of the information groups including the first proper noun, the second proper noun, and attribute information associated with the second proper noun;
[0009] Based on semantic matching between the text to be translated and the plurality of information groups, the second proper noun corresponding to the information group with the highest semantic matching degree among the plurality of information groups is selected as the target translation of the first proper noun.
[0010] Optionally, the identifying the first proper noun in the text to be translated includes:
[0011] Identifying proper nouns to be translated in the text to be translated, wherein the proper nouns to be translated are in Chinese pinyin format;
[0012] According to the Chinese naming rules, the proper noun to be translated is adjusted to a name with the surname first and the given name last;
[0013] The adjusted name is used as the first recognized proper noun.
[0014] Optionally, the querying, based on the first proper noun, of a plurality of second proper nouns corresponding to the first proper noun and attribute information associated with each of the second proper nouns includes:
[0015] Based on the first proper noun, obtaining a knowledge graph associated with a category referred to by the first proper noun;
[0016] According to the knowledge graph, query a plurality of second proper nouns corresponding to the first proper noun;
[0017] According to the second proper nouns and the knowledge graph, attribute information associated with each second proper noun is queried.
[0018] Optionally, based on the plurality of second proper nouns, an information group corresponding to each second proper noun is created, each of the information groups including the first proper noun, the second proper noun and attribute information associated with the second proper noun, including:
[0019] Translating the attribute information associated with each of the second proper nouns to obtain standby attribute information, wherein the standby attribute information is in the same language as the text to be translated;
[0020] An information group corresponding to each of the second proper nouns is created, each of the information groups including the first proper noun, the second proper noun, and the to-be-used attribute information associated with the second proper noun.
[0021] Optionally, performing semantic matching based on the text to be translated and the plurality of information groups, and selecting the second proper noun corresponding to the information group with the highest semantic matching degree among the plurality of information groups as the target translation of the first proper noun includes:
[0022] Based on the plurality of information groups, respectively determining the unused attribute information in each of the information groups;
[0023] Performing semantic matching between the unused attribute information in each of the information groups and the text to be translated, to obtain a matching value for each of the information groups;
[0024] The second proper noun in the information group with the highest matching value is selected as the target translation of the first proper noun.
[0025] Optionally, when the text to be translated includes a plurality of units to be translated divided according to a preset manner, the semantic matching is performed based on the text to be translated and the plurality of information groups, and the second proper noun corresponding to the information group with the highest semantic matching degree among the plurality of information groups is selected as the target translation of the first proper noun, including:
[0026] Based on the plurality of information groups, respectively determining the unused attribute information in each of the information groups;
[0027] Semantically matching the unused attribute information in each of the information groups with each of the units to be translated, and determining a plurality of unit matching information obtained by semantically matching the same information group with a plurality of the units to be translated;
[0028] Determining, based on the plurality of unit matching information, a matching value between an information group corresponding to the unit matching information and the text to be translated;
[0029] The second proper noun in the information group with the highest matching value is selected as the target translation of the first proper noun.
[0030] Optionally, the method further comprises:
[0031] Using a preset word to replace the first proper noun in the text to be translated;
[0032] Translating the text to be translated containing the preset words to obtain a target translation text containing the preset words;
[0033] The second proper noun determined as the target translation is used to replace the preset word in the target translation text.
[0034] According to a second aspect of an embodiment of the present disclosure, a translation apparatus is provided, which is applied to a translation device, and the apparatus includes:
[0035] A recognition module, used for recognizing a first proper noun in a text to be translated, wherein the first proper noun is in a Chinese pinyin format;
[0036] a query module, configured to query, based on the first proper noun, a plurality of second proper nouns corresponding to the first proper noun and attribute information associated with each of the second proper nouns, wherein the second proper nouns are in Chinese character format;
[0037] a creation module, configured to create, based on a plurality of the second proper nouns, an information group corresponding to each of the second proper nouns, each of the information groups comprising the first proper noun, the second proper noun, and attribute information associated with the second proper noun;
[0038] The matching module is used to perform semantic matching based on the text to be translated and the multiple information groups, and select the second proper noun corresponding to the information group with the highest semantic matching degree among the multiple information groups as the target translation of the first proper noun.
[0039] Optionally, the identification module is specifically used for:
[0040] Identifying proper nouns to be translated in the text to be translated, wherein the proper nouns to be translated are in Chinese pinyin format;
[0041] According to the Chinese naming rules, the proper noun to be translated is adjusted to a name with the surname first and the given name last;
[0042] The adjusted name is used as the first recognized proper noun.
[0043] Optionally, the query module is specifically used to:
[0044] Based on the first proper noun, obtaining a knowledge graph associated with a category referred to by the first proper noun;
[0045] According to the knowledge graph, query a plurality of second proper nouns corresponding to the first proper noun;
[0046] According to the second proper nouns and the knowledge graph, attribute information associated with each second proper noun is queried.
[0047] Optionally, the creation module is specifically used to:
[0048] Translating the attribute information associated with each of the second proper nouns to obtain standby attribute information, wherein the standby attribute information is in the same language as the text to be translated;
[0049] An information group corresponding to each of the second proper nouns is created, each of the information groups including the first proper noun, the second proper noun, and the to-be-used attribute information associated with the second proper noun.
[0050] Optionally, the creation module is specifically used to:
[0051] Based on the plurality of information groups, respectively determining the unused attribute information in each of the information groups;
[0052] Performing semantic matching between the unused attribute information in each of the information groups and the text to be translated, to obtain a matching value for each of the information groups;
[0053] The second proper noun in the information group with the highest matching value is selected as the target translation of the first proper noun.
[0054] Optionally, the creation module is specifically used to:
[0055] Based on the plurality of information groups, respectively determining the unused attribute information in each of the information groups;
[0056] Semantically matching the unused attribute information in each of the information groups with each of the units to be translated, and determining a plurality of unit matching information obtained by semantically matching the same information group with a plurality of the units to be translated;
[0057] Determining, based on the plurality of unit matching information, a matching value between an information group corresponding to the unit matching information and the text to be translated;
[0058] The second proper noun in the information group with the highest matching value is selected as the target translation of the first proper noun.
[0059] Optionally, the device further comprises a translation module, the translation module being used to replace the first proper noun in the text to be translated with a preset word;
[0060] Translating the text to be translated containing the preset words to obtain a target translation text containing the preset words;
[0061] The second proper noun determined as the target translation is used to replace the preset word in the target translation text.
[0062] According to a third aspect of an embodiment of the present disclosure, a translation device is provided, including:
[0063] processor;
[0064] a memory for storing processor-executable instructions;
[0065] The processor is configured to execute the translation method as described in the first aspect.
[0066] According to a fourth aspect of an embodiment 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, a translation device is enabled to perform the translation method as described in the first aspect.
[0067] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: in the present disclosure, multiple second proper nouns named in Chinese format are determined based on the first proper noun to be translated, and an information group corresponding to each second proper noun is further created. Semantic matching is performed based on the text to be translated and the multiple information groups, and the best translation of the first proper noun is determined from the multiple second proper nouns, which effectively improves the translation accuracy of pinyin names in texts in other languages and improves the translation quality.
[0068] 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
[0069] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0070] Figure 1 The figure is a flowchart of a translation method according to an exemplary embodiment.
[0071] Figure 2 The figure is a flowchart of a translation method according to an exemplary embodiment.
[0072] Figure 3 The figure is a flowchart of a translation method according to an exemplary embodiment.
[0073] Figure 4 The figure is a flowchart of a translation method according to an exemplary embodiment.
[0074] Figure 5 The figure is a flowchart of a translation method according to an exemplary embodiment.
[0075] Figure 6 The figure is a flowchart of a translation method according to an exemplary embodiment.
[0076] Figure 7 The figure is a flowchart of a translation method according to an exemplary embodiment.
[0077] Figure 8 The figure is a flowchart of a translation method according to an exemplary embodiment.
[0078] Fig. 9 It is a block diagram of a translation device according to an exemplary embodiment.
[0079] Fig.10 It is a block diagram of a translation device shown according to an exemplary embodiment. Detailed implementation
[0080] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0081] Neural machine translation (NMT) is a technology that automatically translates one language into another by a machine based on neural network algorithms. It has become the most mainstream machine translation method currently and has broad technical and industrial value.
[0082] In related technologies, the accurate translation of named proper nouns such as personal names plays a crucial role in the quality of the translation. Although the translation quality of NMT has been significantly improved, the mistranslation rate of proper nouns is still relatively high. There are two main reasons. On the one hand, due to the scarcity and imbalance of training data, as well as the word selection bias of the model during decoding, the current NMT cannot accurately translate named proper nouns such as personal names and place names in the source language sentence according to the context, seriously affecting the accuracy of the translation. On the other hand, the training of conventional NMT models is based on sentence-level bilingual data and cannot directly translate long and complete passage texts. Instead, it can only split the passage text into sentences and translate them independently. Therefore, each sentence is fragmented, and NMT cannot use other context texts outside the current source language sentence to be translated to accurately translate ambiguous proper nouns.
[0083] Taking the translation from English to Chinese as an example, Chinese personal names are generally represented by pinyin in English, and there is generally a one-to-many mapping relationship between pinyin personal names and Chinese personal names. For example, "Chen Wei" can be translated as "陈伟", "陈威", "陈薇", etc. This makes it difficult to determine the target Chinese translation based on "Chen Wei" when using NMT to translate from English to Chinese, and only an arbitrarily selected name with the same pronunciation as "Chen Wei" can be chosen, but this translated name may be incorrect. As a result, all Chinese names in the entire passage are mistranslated, or "Chen Wei" is partially translated as "陈伟", partially translated as "陈薇", and partially translated as "陈威".
[0084] In a single-sentence translation scenario, for example, the text to be translated is a single independent English sentence "Chen Wei is a researcher at the Institute of XXXX." When using NMT in the existing technology for translation, an incorrect translation such as "Chen Wei is a researcher at the Institute of XXXX." may be generated. However, a human translator will query based on information such as "Institute of XXXX." and, according to the relevant results obtained, accurately translate the proper name "Chen Wei" in the above independent English sentence as "Chen Wei". Therefore, in this scenario, due to reasons such as the lack of relevant training data, NMT is unable to accurately translate the proper name "Chen Wei".
[0085] In a multi-sentence translation scenario, for example, the text to be translated is a complete passage or paragraph containing multiple sentences, including two English sentences "Chen Wei has made major achievements in basic research and development of vaccine and protective medicine." and "She is a researcher at the Institute of XXXX." Since NMT in the existing technology adopts sentence-level translation during the translation process, the generated translations are "Chen Wei has made major achievements in basic research and development of vaccine and protective medicine." and "She is a researcher at the Institute of XXXX." Among them, the proper name "Chen Wei" to be translated is still mis-translated. During the translation process, a human translator will query based on information such as "Institute of XXXX" that appears in the second sentence of the passage, and judge the attribute relationship between "Chen Wei" and the name of the institution through context logic, and then accurately translate this person's name as "Chen Wei". However, the sentence-level NMT in the existing technology may not be able to generate an accurate translation due to the lack of necessary context information during decoding, the translation accuracy of proper names is relatively low, which affects the accuracy of machine translations and the user experience is not good.
[0086] To solve the above problems, the present disclosure proposes a translation method that maps the proper nouns in the text to be translated to multiple Chinese proper nouns, performs semantic matching with the text to be translated according to the attribute information associated with each Chinese proper noun, and selects the Chinese proper noun with the highest semantic matching degree as the target translation of the proper noun in the text to be translated, effectively improving the translation accuracy of pinyin names in texts in other languages and having better translation quality.
[0087] According to an exemplary embodiment, the translation method in this embodiment is applied to a translation device, belonging to the field of machine translation in the process of natural language processing, and can also be extended to other fields such as natural language anaphora resolution. The translation device in this embodiment can be an electronic device such as a server, a personal computer, a tablet computer, or a mobile phone. As Figure 1 shown, the translation method in this embodiment includes the following steps:
[0088] S11. Identify the first proper noun in the text to be translated.
[0089] In this embodiment, the text to be translated can be a text in a language other than Chinese. In the text to be translated, the first proper noun is in Chinese pinyin format. Among them, the text to be translated can be a foreign language text such as English, French, Korean, etc., but the proper nouns in it are in Chinese pinyin format. The first proper noun can be a name with homonyms, such as a person's name or a city name. The above homonyms can be formed by various combinations of homophonic characters and characters with the same pronunciation but different tones.
[0090] Here, it should be noted that when the first proper noun is a person's name, the naming method of the first proper noun in Chinese pinyin format involved in this step is determined according to the rules of the Chinese surname and given name (surname + given name) to conform to the naming rules of Chinese names and improve translation accuracy. For example, when the actual name in the text to be translated is "Wei Chen", the translation method in this embodiment will first determine the actual name "Wei Chen" as the first proper noun "Chen Wei" according to the above surname and given name rules (surname + given name).
[0091] For example, the first proper noun can be a person's name. The Chinese person's name "Chen Wei" is represented by the pinyin "ChenWei" in an English text; the Chinese person's name "Chen Wei" is also represented by "Chen Wei" in an English text; the Chinese person's name "Chen Wei" is also represented by "Chen Wei" in an English text. Therefore, in the text to be translated, if "Chen Wei" is in Chinese pinyin format, it can be considered as the first proper noun.
[0092] Another example is that the first proper noun can be a place name. The Chinese place name "Anxi" is represented by the pinyin "An xi" in an English text; the Chinese place name "Anxi" is also represented by "An xi" in an English text. Therefore, in the text to be translated, if "An xi" is in Chinese pinyin format, it can be considered as the first proper noun.
[0093] Of course, it can be understood that for person's names, place names, etc. that do not have homonym situations, the method in this embodiment can also be used for translation to improve translation accuracy.
[0094] S12. Query multiple second proper nouns corresponding to the first proper noun and the attribute information associated with each second proper noun. The second proper nouns are in Chinese character format.
[0095] In this step, when the first proper noun is a personal name or a place name with homonyms, it is first necessary to determine multiple second proper nouns corresponding to the first proper noun in Chinese format for subsequent step selection. At the same time, it is also necessary to determine the attribute information associated with each second proper noun to help analyze which one of the multiple second proper nouns is the most suitable Chinese translation for the first proper noun in the current text to be translated.
[0096] The meaning of the multiple second proper nouns corresponding to the first proper noun involved in this step is that the Chinese characters of the multiple second proper nouns are different, but the pronunciations of the second proper nouns with different Chinese characters are all the same; and when the multiple second proper nouns are converted into Chinese pinyin format, they are all the same as the first proper noun. For example, if the first proper noun is "chen wei", the multiple second proper nouns corresponding to the first proper noun "Chen Wei" can be "陈伟", "陈威", "陈薇", "陈维", "陈微", etc.
[0097] In one example, the first proper noun is the personal name in Chinese pinyin format "Chen Yu". Querying according to "Chen Yu", the second proper nouns corresponding to "Chen Yu" include multiple Chinese personal names named in Chinese format such as "陈钰", "陈瑜", "陈玉", "陈羽", etc. And further determine the attribute information associated with each second proper noun. The attribute information can be, for example, gender, age, work unit, education level, interpersonal relationship, etc. For example, the attribute information of "陈羽" can be "male, 35 years old, XXXX, undergraduate degree, married"; another example, the attribute information of "陈玉" can be "female, 20 years old, unemployed, high school education level, unmarried".
[0098] In another example, the first proper noun is the place name in Chinese pinyin format "An xi". Querying according to "An xi", the second proper nouns corresponding to "An xi" include multiple Chinese place names named in Chinese format such as "安西" and "安溪". And further query the attribute information associated with "安西" and "安溪". For example, the attribute information associated with "安西" is Jiuquan City, Gansu Province; another example, the attribute information associated with "安溪" is Quanzhou City, Fujian Province.
[0099] In another example, the first proper noun is the name "Chen wei" in Chinese pinyin format. The second proper nouns corresponding to "Chen wei" obtained by querying "Chenwei" include multiple Chinese names named in Chinese format, such as "Chen Wei", "Chen Wei", "Chen Wei", and "Chen Wei". For each second proper noun, multiple attribute information can be associated. For example, Chen Wei can contain multiple attribute information such as "Nankai University" and "Tianjin"; Chen Wei can contain attribute information such as "Chinese Academy of Engineering" and "Academy of Military Sciences". It can be expressed as "Chen Wei": {"Nankai University", "Tianjin"} and "Chen Wei": {"Chinese Academy of Engineering", "Academy of Military Sciences"}.
[0100] Among them, the method of determining the second proper noun based on the first proper noun can be through ontology query or online query. When performing local query, a personal name knowledge graph can be pre-established locally. When the first proper noun needs to be translated during the translation process, multiple second proper nouns are determined by querying the personal name knowledge graph, and the attribute information associated with each second proper noun is determined based on the content stored in the personal name knowledge graph. The personal name knowledge graph will be updated regularly to ensure the accuracy of the translation. When performing online query, when the first proper noun needs to be translated during the translation process, you can connect to the Internet to send a related request for query to determine the multiple second proper nouns corresponding to the first proper noun and their attribute information.
[0101] S13. Based on the plurality of second proper nouns, create an information group corresponding to each second proper noun, each information group including the first proper noun, the second proper noun and attribute information associated with the second proper noun.
[0102] In this step, information groups corresponding to the second proper nouns are created based on the queried second proper nouns and the associated attribute information, and each second proper noun corresponds to an information group. In one example, the first proper noun "Chen Wei" corresponds to two second proper nouns, "Chen Wei" and "Chen Wei". Among them, the attribute information related to the second proper noun "Chen Wei" is "Nankai University" and "Tianjin"; the attribute information related to the second proper noun "Chen Wei" is "Chinese Academy of Engineering" and "XX Academy of Sciences". Then the two information groups that can be created in this step are [Chen Wei, Chen Wei, {"Nankai University", "Tianjin"}] and [Chen Wei, Chen Wei, {"Chinese Academy of Engineering", "XX Academy of Sciences"}].
[0103] Of course, it is understandable that, since the attribute information associated with the second proper noun queried in step S12 is Chinese information, the attribute information in the information group created in this step is also expressed in Chinese. However, according to the requirements in the application process of the method, the second proper noun and the attribute information associated with it involved in the information group created in this step can be recorded in the same language as the language of the text to be translated.
[0104] S14: performing semantic matching based on the text to be translated and the multiple information groups, and selecting the second proper noun corresponding to the information group with the highest semantic matching degree among the multiple information groups as the target translation of the first proper noun.
[0105] Semantic matching is performed based on the text to be translated and multiple information groups, each of which includes a first proper noun, a second proper noun, and attribute information associated with the second proper noun. The higher the semantic matching degree between the various information included in the information group and the content involved in the text to be translated, the more likely it is that the second proper noun included in the information group is an accurate translation of the first proper noun mentioned in the text to be translated.
[0106] In one example, the first proper noun is a place name "An xi" in Chinese pinyin format. Two information groups are created based on the first proper noun. The first information group is: [An xi, Anxi, {"Jiuquan City", "Gansu Province"}]; the second information group is: [An xi, Anxi, {"Quanzhou City", "Fujian Province"}]. Based on the text to be translated, it is found that the text to be translated mentions food related to Fujian Province and Quanzhou City, indicating that the second information group has a higher semantic match with the text to be translated. Therefore, the second proper noun "Anxi" corresponding to the second information group can be determined as the target translation of the first proper noun "An xi".
[0107] In another example, the text to be translated is "Chen Wei is a researcher at the Institute of XXX under the Academy of XX Science", and the two information groups created in step S13 are [Chen Wei, Chen Wei, {"Nankai University", "Tianjin"}] and [Chen Wei, Chen Wei, {"Chinese Academy of Engineering", "XX Academy of Sciences"}], which are semantically matched with the text to be translated. Since the above English text contains "Academy of XX Science", which is "XX Academy of Sciences", this part of the content has the highest matching degree with [Chen Wei, Chen Wei, {"Chinese Academy of Engineering", "XX Academy of Sciences"}], therefore, the second proper noun "Chen Wei" is determined as the target translation of the first proper noun "Chen Wei".
[0108] Here, assuming that the language of the text to be translated is English, during the semantic matching process, the text to be translated can be translated into Chinese and then semantic matching can be performed based on the Chinese content; or the attribute information in the information group can be translated into English and then semantic matching can be performed.
[0109] The translation method in this embodiment can be applied to any neural machine translation model based on the encoder-decoder framework, with the input being the text to be translated and the output being the target language translation text. During the translation process, multiple second proper nouns are determined based on the first proper noun to be translated, the second proper nouns are in Chinese character format, and an information group corresponding to each second proper noun is further created, and semantic matching is performed based on the text to be translated and the multiple information groups, and the best translation of the first proper noun is determined from the multiple second proper nouns, which effectively improves the translation accuracy of the pinyin names in texts in other languages, and the translation quality is better.
[0110] According to an exemplary embodiment, the translation method in this embodiment is a further refinement of step S11 in the above embodiment, such as Figure 2 As shown, the method in this embodiment includes the following steps:
[0111] S111, identifying proper nouns to be translated in the text to be translated.
[0112] In this step, the proper nouns to be translated are in Chinese Pinyin format, and the proper nouns to be translated in this step are in Chinese Pinyin format. For example, the proper nouns to be translated are "Wei Chen", "Er Wang", "San Zhang", etc.
[0113] S112. According to the Chinese naming rules, the proper noun to be translated is adjusted to a name with the surname first and the given name second.
[0114] Since some foreign name rules are different from Chinese name rules, for example, the English name rule is that the given name comes first and the surname comes last, in order to facilitate the determination of the second proper noun, it is necessary to adjust the proper noun to be translated according to the Chinese name naming rule, and the adjusted rule is the Hundred Family Surnames rule, that is, the surname comes first and the given name comes last. After the several proper nouns to be translated involved in the above step S111 are adjusted according to the Chinese name naming rule in this step, they become "Chen Wei", "WangEr", and "Zhang San".
[0115] S113. Use the adjusted name as the first recognized proper noun.
[0116] The "Chen Wei", "Wang Er" and "Zhang San" adjusted in step S112 are used as the recognized first proper nouns. Depending on the content involved in the text to be translated, only one first proper noun may be included, or multiple first proper nouns may be included.
[0117] The method in this embodiment can discover the proper noun in the English text to be translated through a Name Entity Recognition (NER) tool, and further adjust it according to the Chinese name naming rules. The adjusted name is the first proper noun.
[0118] It should be noted that, in the case where the first proper noun identified in step S11 is a place name, since the naming rules for place names in foreign language texts such as English are usually the same as those in Chinese, this step can be omitted, that is, there is no need to adjust the identified proper noun to be translated, and it can be directly used as the first proper noun.
[0119] According to an exemplary embodiment, the method in this embodiment is a further refinement of step S12 in the above embodiment, such as Figure 3 As shown, the method in this embodiment includes the following steps:
[0120] S121. Based on the first proper noun, obtain a knowledge graph associated with the category referred to by the first proper noun.
[0121] The knowledge graph in this step can be a local database pre-stored in the translation device, or can be obtained through the Internet. The knowledge graph needs to be established in advance, for example, by collecting personal name information and various attribute information related to the personal name information in advance to establish a personal name knowledge graph; for another example, by collecting place name information and various attribute information related to the place name information in advance to establish a place name knowledge graph.
[0122] Different knowledge graphs need to be queried for different categories of the first proper noun, such as a person's name or a place name. In one example, when the first proper noun is a person's name, you can query the knowledge graph related to the person's name, such as the person's name knowledge graph, which also has the attribute information of each person's name associated with it. In another example, when the first proper noun is a place name, you can query the knowledge graph related to the place name, such as the place name knowledge graph, which also has the attribute information of each place name associated with it.
[0123] S122. Query multiple second proper nouns corresponding to the first proper noun based on the knowledge graph.
[0124] In the knowledge graph, search for the Chinese corresponding to the pinyin without the tones, that is, search for the second proper noun corresponding to the first proper noun.
[0125] In an example, the first proper noun is a place name "An xi" in pinyin format, and the knowledge graph is a place name knowledge graph. Then, when searching for "An xi" in the place name knowledge graph, it can be found that the place names corresponding to "An xi" are "Anxi" and "Anxi".
[0126] In another example, the first proper noun is a person's name "Chen Wei" in Chinese pinyin format, and the knowledge graph is a person's name knowledge graph. Then, when searching for "Chen Wei" in the person's name knowledge graph, the person's names corresponding to "Chen Wei" include "Chen Wei", "Chen Wei", "Chen Wei", "Chen Wei" and "Chen Wei".
[0127] S123. According to the second proper nouns and the knowledge graph, query the attribute information associated with each second proper noun.
[0128] After multiple second proper nouns are determined in step S122, for each second proper noun, a query is performed in the knowledge graph corresponding to the second proper noun to query the associated attribute information related to the knowledge graph. Among them, for different types of second proper nouns, the associated attribute information is different. When the second proper noun is a person's name, the associated attribute information may be the person's gender, age, family members, work address, education, achievements, etc. When the second proper noun is a place name, the associated attribute information may be the province, city, food, monuments, scenery, etc. related to the place.
[0129] In one example, when the second proper noun is "Anxi", the associated attribute information queried in the knowledge graph is Jiuquan City, Gansu Province; when the second proper noun is "Anxi", the associated attribute information queried in the knowledge graph is Quanzhou City, Fujian Province.
[0130] In another example, when the second proper noun is "Chen Wei", the associated attribute information queried in the knowledge graph is "Nankai University", "Tianjin", and other attribute information; when the second proper noun is "Chen Wei", the associated attribute information queried in the knowledge graph is "Chinese Academy of Engineering", "XX Academy of Sciences" and other attribute information.
[0131] According to an exemplary embodiment, Figure 4 As shown, the translation method in this embodiment includes the following steps:
[0132] S21. Identify the first proper noun in the text to be translated.
[0133] This step is implemented in the same manner as step S11 in the above embodiment, and will not be described in detail herein.
[0134] S22. Query multiple second proper nouns corresponding to the first proper noun, and the attribute information associated with each second proper noun.
[0135] This step is implemented in the same way as step S12 in the above embodiment, and will not be elaborated here.
[0136] S23. Translate the attribute information associated with each second proper noun to obtain待用 attribute information, where the待用 attribute information is in the same language as the text to be translated.
[0137] Since the attribute information associated with the second proper noun is recorded in Chinese in the knowledge graph, and when performing semantic matching with the text to be translated later, the matching is performed using the language of the text to be translated. Therefore, for the convenience of semantic matching, it is necessary to translate the attribute information associated with the second proper noun into information in the same language as the text to be translated to obtain待用 attribute information.
[0138] For example, the first proper noun "Chen Wei" corresponds to multiple second proper nouns "陈威" and "陈薇". "陈威" is associated with multiple attribute information such as "南开大学" (Nankai University) and "天津" (Tianjin); "陈薇" is associated with attribute information such as "中国工程院" (Chinese Academy of Engineering) and "XX科学院" (Academy of XX Science). Translate the attribute information to obtain待用 attribute information, where the待用 attribute information is in the same language as the text to be translated. Assume the text to be translated is an English text, then the待用 attribute information associated with the second proper noun "陈威" is "Nankai University" and "Tianjin"; the待用 attribute information associated with the second proper noun "陈薇" is "Chinese Academy of Engineering" and "Academy of XX Science".
[0139] Of course, it can be understood that in another example, if when performing semantic matching later, the Chinese text obtained after translating the text to be translated is used for matching, then the attribute information does not need to be translated, and the attribute information in Chinese character format associated with the second proper noun can be directly used for semantic matching.
[0140] S24. Create an information group corresponding to each second proper noun.
[0141] In this step, each information group includes the first proper noun, the second proper noun, and the待用 attribute information associated with the second proper noun. Among them, the number of information groups is the same as the number of second proper nouns, and the information groups correspond to the second proper nouns one by one. Among them, the first proper noun is recorded in pinyin format, the second proper noun is in Chinese character format, and the待用 attribute information is in the same language as the text to be translated.
[0142] In one example, an information group is created based on the second proper nouns "Chen Wei" and "Chen Wei", and the attribute information associated with each second proper noun is translated. Two information groups can be created. The first information group is: [Chen Wei, Chen Wei, {"Nankai University", "Tianjin"}]. Among them, "Chen Wei" is the first proper noun, "Chen Wei" is the second proper noun, and "Nankai University" and "Tianjin" are the待用 attribute information.
[0143] The second information group is: [Chen Wei, Chen Wei, {"Chinese Academy of Engineering", "Academy of XX Science"}]. In this information group, "Chen Wei" is the first proper noun; "Chen Wei" is the second proper noun; "Chinese Academy of Engineering" and "Academy of XX Science" are the associated待用 attribute information.
[0144] S25. Perform semantic matching based on the text to be translated and multiple information groups, and select the second proper noun corresponding to the information group with the highest semantic matching degree among the multiple information groups as the target translation of the first proper noun.
[0145] There can be multiple second proper nouns corresponding to the first proper noun. For each second proper noun, an information group will be created. Therefore, multiple information groups will be obtained. To accurately determine which one of the multiple second proper nouns is the accurate target translation of the first proper noun, it is necessary to perform semantic matching between each of the multiple information groups and the text to be translated. The second proper noun included in the information group with the highest matching degree is the target translation of the first proper noun.
[0146] In a translation example, the text to be translated involved in this example is a separate sentence. For example, the text to be translated is "Chen Wei is a researcher at the Institute of XXXX under the Academy of XX Science". For the first proper noun "Chen Wei", the second proper nouns involved are "Chen Wei" and "Chen Wei". Then two information groups can be determined. The first information group: [Chen Wei, Chen Wei, {"Nankai University", "Tianjin"}] and the second information group: [Chen Wei, Chen Wei, {"Chinese Academy of Engineering", "Academy of XX Science"}]. When performing semantic matching, as Figure 5 shown, this step specifically includes the following steps:
[0147] S251. Based on multiple information groups, respectively determine the待用属性信息 in each information group.
[0148] In this step, based on the above first information group and second information group, first determine the待用属性信息 in the first information group that is the same as the language of the text to be translated, namely "Nankai University" and "Tianjin", and determine the content in the second information group that is the same as the language of the text to be translated, namely "Chinese Academy of Engineering" and "Academy of XX Science".
[0149] S253. The待用属性信息 in each information group is semantically matched with the text to be translated to obtain the matching degree value of each information group.
[0150] The待用属性信息 "Nankai University" and "Tianjin" in the first information group are semantically matched with the text to be translated to obtain the first matching degree value of the first information group. The待用属性信息 "Chinese Academy of Engineering" and "Academy of XX Science" in the second information group are semantically matched with the text to be translated to obtain the second matching degree value of the second information group.
[0151] It should be noted that the term "待用属性信息" seems to be a specific term in the original text with an unclear meaning in English. You may need to clarify or correct it according to the actual situation. The above translation is based on the literal meaning.In this embodiment, both the first matching degree value and the second matching degree value are average matching scores. The meaning of the average matching score is the ratio of the total matching score of the information group to the number of attributes. The total matching score of the information group is the sum of the scores after all the待用 attribute information in the information group is matched. For example, if an information group includes 5 pieces of待用 attribute information, if a piece of待用 attribute information is matched with the text to be translated, one point is obtained; if a piece of待用 attribute information is not matched with the text to be translated, no score is obtained. Suppose 3 pieces of the 5 pieces of待用 attribute information included in the information group are matched with the text to be translated, then the total matching score of the information group is 3, and the average matching score of the information group is 3 / 5. Of course, it can be understood that in addition to the above method of using the average matching score as the matching degree value, other methods in the prior art can also be used. When using other methods to determine the matching degree value, the matching degree value can be a positive integer, etc.
[0152] For the first information group and the second information group involved in this embodiment, the待用 attribute information "Academy of XX Science" in the second information group can be matched with the content recorded in the text to be translated, while any piece of待用 attribute information in the first information group cannot be matched with the content recorded in the text to be translated. Therefore, obviously, the matching degree value of the second information group is higher than that of the first information group.
[0153] In addition, it should be noted that the method of semantic matching between the待用 attribute information included in each information group and the text to be translated can be implemented using conventional matching methods in the art, which will not be elaborated here.
[0154] S255. Select the second proper noun in the information group with the highest matching degree value as the target translation of the first proper noun.
[0155] In the above steps, it has been determined that the matching degree value of the second information group is higher than that of the first information group, indicating that the待用 attribute information involved in the second information group has a higher relevance to the text to be translated. Then, the second proper noun "Chen Wei" in the second information group can be determined as the target translation of the first proper noun "Chen Wei".
[0156] In another translation example, the text to be translated is a paragraph containing multiple sentences. For example, "Chen Wei has made major achievements in basic research and development of vaccine and protective medicine." and "She is a researcher at the Institute of XXXX under the Academy of XX Science." In the translation process of paragraphs involving multiple sentences, each sentence needs to be semantically matched with multiple information groups.
[0157] like Figure 6 As shown, in this translation example, step S25 in this embodiment specifically includes the following steps:
[0158] 252. Based on the multiple information groups, determine the standby attribute information in each information group respectively.
[0159] This step is implemented in the same manner as step S251 and will not be described again here.
[0160] 254. Semantically match the unused attribute information in each information group with each unit to be translated, and determine multiple unit matching information obtained by semantically matching the same information group with multiple units to be translated.
[0161] In this translation example, the text to be translated includes two units to be translated, namely the first unit to be translated "Chen Wei has made major achievements in basic research and development of vaccine and protective medicine." and the second unit to be translated "She is a researcher at the Institute of XXXX under the Academy of XX Science.". Two information groups are determined according to the first proper noun involved in the text to be translated, namely the first information group: [Chen Wei, Chen Wei, {"Nankai University", "Tianjin"}] and the second information group: [Chen Wei, Chen Wei, {"Chinese Academy of Engineering", "Academy of XXScience"}].
[0162] When performing semantic matching, the first information group is to be semantically matched with the first unit to be translated and the second unit to be translated respectively, and the matching information obtained by the semantic matching of the first information group and the first unit to be translated, as well as the matching information obtained by the semantic matching of the first information group and the second unit to be translated, are determined, that is, the first information group corresponds to two unit matching information.
[0163] Similarly, the second information group must also be semantically matched with the first unit to be translated and the second unit to be translated, respectively, to determine the matching information obtained by the semantic matching of the second information group with the first unit to be translated, and the matching information obtained by the semantic matching of the second information group with the second unit to be translated, that is, the second information group corresponds to two unit matching information.
[0164] The implementation of the first information group and the first unit to be translated and the second unit to be translated, and the second information group and the first unit to be translated and the second unit to be translated in the semantic matching process is the same as that in S253, and will not be repeated here.
[0165] 256. Determine, based on the plurality of unit matching information, a matching value between the information group corresponding to the unit matching information and the text to be translated.
[0166] According to the two unit matching information in the first information group determined in step S254, the matching value between the first information group and the text to be translated is determined. In the process of determining the matching value, the matching value can be the sum of the two unit matching information or the average value of the two unit matching information.
[0167] In an example, assuming that the two unit matching information of the first information group are 1 and 0 respectively, and the two unit matching information of the second information group are 1 and 1 respectively, and the matching value in this example is the sum of the two unit matching information, then the matching value of the first information group and the text to be translated is 1, and the matching value of the second information group and the text to be translated is 2.
[0168] In another example, assuming that the two unit matching information of the first information group are 1 and 0 respectively, and the two unit matching information of the second information group are 1 and 1 respectively, and the matching value in this example is the average of the two unit matching information, then the matching value of the first information group and the text to be translated is 0.5, and the matching value of the second information group and the text to be translated is 1.
[0169] 258. Select the second proper noun in the information group with the highest matching value as the target translation of the first proper noun.
[0170] According to the example described in step S256, the matching degree value of the second information group with the text to be translated is greater than that of the first information group with the text to be translated. Therefore, the second proper noun "Chen Wei" in the second information group is selected as the target translation of the first proper noun "Chen Wei".
[0171] The translation method in this embodiment uses rich knowledge graph resources as support. Whether it is single-sentence translation or text translation, it can accurately and efficiently determine the target Chinese translation corresponding to the proper noun in the form of Chinese pinyin involved in the text to be translated, improve the translation accuracy of pinyin names, and enhance the user experience of using the translation device for translation.
[0172] According to an exemplary embodiment, after determining the target translation of the first proper noun by the method involved in the above embodiment, as Figure 7 shown, the translation method in this embodiment further includes the following steps:
[0173] S31. Use a preset word to replace the first proper noun in the text to be translated.
[0174] After determining the target translation of the first proper noun in the text to be translated, the determined second proper noun will not be directly used to replace the first proper noun in the text to be translated. Instead, a preset word is first used to replace the first proper noun in the text to be translated. For example, when translating "Chen Wei is a researcher at the Institute of XXXX under the Academy of XX Science", the preset word " <person>Replace "Chen Wei", then the above text to be translated becomes the text to be translated containing the preset words" <person>is a researcher at the Institute of XXXX under the Academy of XX Science”.
[0175] It is understandable that when the text to be translated includes multiple different first proper nouns, the preset names may also be different. For example, you can use "<PERSON 1> "Replace "Chen Wei"," <person2>” instead of "Li Wei".
[0176] S32: Translate the text to be translated containing the preset words to obtain a target translation text containing the preset words.
[0177] After the first proper noun is replaced with the preset word, the text to be translated is translated, and during the translation process, only the part except the preset word is translated, and the preset word is not translated, so as to obtain a target translation text containing the preset word.
[0178] For example, in the example of step S31, after the method recorded in this step, the translation " <person>is a researcher at the XXXX Institute of the XX Academy of Sciences.
[0179] S33. Replace the preset word in the target translation text with the second proper noun determined to be the target translation.
[0180] After obtaining the translation in step S32, continue to process this translation, and replace the preset word in the target translation text with the second proper noun determined to be the target translation to obtain the final text of the text to be translated.
[0181] For example, if it is determined that the target translation of the first proper noun "Chen Wei" is the second proper noun "Chen Wei", then in this step, use "Chen Wei" to replace the <person>, and the final text is "Chen Wei is a researcher at the XXXX Institute of XX Academy of Sciences".
[0182] In the present embodiment, the translation method of the first proper noun can adopt the above method, and the remaining content in the text to be translated can be translated in a conventional manner in the relevant technology. At present, the mainstream neural machine translation model framework generally adopts an end-to-end encoder-decoder model (end-to-end encoder-decoder) model framework, which uses a convolutional neural network (convolution neural network, CNN) or a recurrent neural network (recurrent neural network, RNN) or a self-attention network (self-attention) to encode a given source language text word sequence into a continuous vector, and then uses a recurrent neural network or a self-attention network as a decoder to convert the source language state vector into a target language translation output, and generally uses a gradient descent method (SGD, The Saccharomyces Genome Database) to optimize the parameters used by the entire model. The model obtained through training can be used for decoding, that is, given a source language sentence to be translated, using the same text pre-processing process as training, using an encoder to encode the text sequence after pre-processing, when decoding, generally using a beam search (beam search) algorithm to obtain multiple candidate translations, and select the translation output with the highest probability. The remaining content in the text to be translated in this embodiment can be translated using the above-mentioned neural machine translation model framework.
[0183] The above embodiments, in the case of having a knowledge graph resource with rich data, can effectively improve the translation accuracy of proper nouns in the Chinese pinyin format in the text to be translated and improve the quality of the translation.
[0184] According to an exemplary embodiment, Figure 8 As shown, this embodiment provides a translation method, which is applied to a translation device. The method in this embodiment includes the following steps:
[0185] S41. Identify proper nouns to be translated in the text to be translated, where the proper nouns to be translated are in Chinese pinyin format.
[0186] This step is the same as the implementation of step S112 in the above embodiment, and will not be described again here.
[0187] S42. Determine the reference category of the proper noun to be translated.
[0188] In this step, the reference category includes a person's name or a place name. When the reference category of the proper noun to be translated is a person's name, step S43 is executed; when the reference category of the proper noun to be translated is a place name, step S45 is executed.
[0189] When determining the reference category of the proper noun to be translated, you can use a pre-stored knowledge graph, or connect to the Internet for query. Search or traverse the place name knowledge graph and the person name knowledge graph. When the content related to the proper noun to be translated is found in the person name knowledge graph, it means that the reference category of the proper noun to be translated is a person name; when the content related to the proper noun to be translated is found in the place name knowledge graph, it means that the reference category of the proper noun to be translated is a place name.
[0190] In one example, in step S41, it is determined that the proper noun to be translated is "Wei Chen". During the search in the place name knowledge graph and the personal name knowledge graph, the content "Chen Wei" is found in the personal name knowledge graph. Then it can be determined that the reference category of the proper noun "Wei Chen" to be translated is a personal name.
[0191] In another example, in step S41, it is determined that the proper noun to be translated is "An Xi". During the search in the place name knowledge graph and the person name knowledge graph, the content "An Xi" is found in the place name knowledge graph. It can be determined that the reference category of the proper noun "An Xi" to be translated is a place name.
[0192] In another example, in step S41, it is determined that the proper noun to be translated is "An Xi". During the search in the place name knowledge graph and the personal name knowledge graph, the content "An Xi" is found in the place name knowledge graph, and the content "Xi An" is found in the personal name knowledge graph. At this time, the reference category of the proper noun "An Xi" to be translated may be a personal name or a place name, and it is necessary to further determine the reference category based on the context and context of the proper noun "An Xi" to be translated. If the context of the context of the proper noun "An Xi" to be translated is content related to natural scenery, food, etc., it can be determined that its reference category is a place name. If the context of the context of the proper noun "An Xi" to be translated is content related to humanities and social sciences, it can be determined that its reference category is a personal name.
[0193] S43. According to the Chinese naming rules, the proper noun to be translated is adjusted to a name with the surname first and the given name second.
[0194] This step is the same as the implementation of the above step S112 and will not be described again here.
[0195] S44. Use the adjusted name as the first recognized proper noun.
[0196] This step is the same as the implementation of the above step S113 and will not be described again here.
[0197] S45. Taking the proper noun to be translated as the first identified proper noun.
[0198] In this step, because usually, place names in the text to be translated are translated by literal translation, for example, the place name "Anxi" will be translated as "An Xi" in the text to be translated, but not as "Xi An", so when the reference category of the proper noun to be translated is a place name, the proper noun to be translated is directly used as the first proper noun identified, and there is no need to adjust the order of the Chinese pinyin.
[0199] In addition, in this embodiment, the subsequent method for determining the target translation of the first proper noun is the same as the implementation method of the method in the above embodiment, and will not be described in detail here.
[0200] The method in this embodiment first determines that the reference category of the proper noun to be translated is a place name or a person's name before determining the first proper noun, and then uses different methods to determine the first proper noun, thereby further improving the translation accuracy.
[0201] According to an exemplary embodiment, Fig. 9 As shown, this embodiment provides a translation device, which is applied to a translation device. The device is used to implement the above Figures 1 to 8 The translation method shown in the embodiment includes a recognition module 100, a query module 200, a creation module 300, a matching module 400 and a translation module 500.
[0202] Among them, the recognition module 100 is used to identify the first proper noun in the text to be translated, and the first proper noun is in the Chinese pinyin format. The query module 200 is used to query multiple second proper nouns corresponding to the first proper noun and the attribute information associated with each second proper noun according to the first proper noun, and the second proper noun is in the Chinese character format. The creation module 300 is used to create an information group corresponding to each second proper noun based on multiple second proper nouns, and each information group includes the first proper noun, the second proper noun and the attribute information associated with the second proper noun. The matching module 400 is used to perform semantic matching based on the text to be translated and multiple information groups, and select the second proper noun corresponding to the information group with the highest semantic matching degree in the multiple information groups as the target translation of the first proper noun. The translation module 500 is used to replace the first proper noun in the text to be translated with a preset word; translate the text to be translated containing the preset word to obtain a target translation text containing the preset word; and replace the preset word in the target translation text with the second proper noun determined as the target translation.
[0203] 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.
[0204] Fig.10 8 is a block diagram of a translation device 800 according to an exemplary embodiment. For example, the device 800 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.
[0205] Device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0206] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0207] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 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.
[0208] The power component 806 provides power to the various components of the device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0209] The multimedia component 808 includes a screen that provides an output interface between the device 800 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 808 includes a front camera and / or a rear camera. When the device 800 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.
[0210] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating 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 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0211] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0212] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0213] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 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 816 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 816 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.
[0214] In an exemplary embodiment, the device 800 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 methods.
[0215] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 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.
[0216] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute a translation method, the method comprising: identifying a first proper noun in a text to be translated, the first proper noun being in a Chinese pinyin format; querying a plurality of second proper nouns corresponding to the first proper noun and attribute information associated with each second proper noun according to the first proper noun, the second proper noun being in a Chinese character format; creating an information group corresponding to each second proper noun based on the plurality of second proper nouns, each information group comprising the first proper noun, the second proper noun and attribute information associated with the second proper noun; performing semantic matching based on the text to be translated and the plurality of information groups, selecting the second proper noun corresponding to the information group with the highest semantic matching degree among the plurality of information groups as the target translation of the first proper noun.
[0217] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0218] It should be understood that the present invention is not limited to the exact construction that has 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 invention is limited only by the appended claims.< / person> < / person> < / person> < / person>
Claims
1. A translation method, applied to a translation device, characterized in that: The method comprises: identifying a first proper noun in the text to be translated, wherein the first proper noun is in a Chinese pinyin format; According to the first proper noun, multiple second proper nouns corresponding to the first proper noun and attribute information associated with each of the second proper nouns are queried, wherein the second proper nouns are in Chinese character format; wherein the multiple second proper nouns corresponding to the first proper noun mean that the multiple second proper nouns have different Chinese characters, but the pronunciations of the second proper nouns with different Chinese characters are all the same; according to the knowledge graph associated with the reference category of the first proper noun, the attribute information associated with each of the second proper nouns is queried; Based on a plurality of the second proper nouns, creating an information group corresponding to each of the second proper nouns, each of the information groups including the first proper noun, the second proper noun, and attribute information associated with the second proper noun; Performing semantic matching between the text to be translated and the plurality of information groups, selecting the second proper noun corresponding to the information group with the highest semantic matching degree among the plurality of information groups as the target translation of the first proper noun; Wherein, based on the plurality of the second proper nouns, an information group corresponding to each of the second proper nouns is created, each of the information groups including the first proper noun, the second proper noun and attribute information associated with the second proper noun, including: Translating the attribute information associated with each of the second proper nouns to obtain standby attribute information, wherein the standby attribute information is in the same language as the text to be translated; creating an information group corresponding to each of the second proper nouns, each of the information groups including the first proper noun, the second proper noun, and the to-be-used attribute information associated with the second proper noun; When the text to be translated includes a plurality of units to be translated divided according to a preset manner, the semantic matching is performed based on the text to be translated and the plurality of information groups, and the second proper noun corresponding to the information group with the highest semantic matching degree among the plurality of information groups is selected as the target translation of the first proper noun, including: Based on the plurality of information groups, respectively determining the unused attribute information in each of the information groups; Semantically matching the unused attribute information in each of the information groups with each of the units to be translated, and determining a plurality of unit matching information obtained by semantically matching the same information group with a plurality of the units to be translated; Determining, based on the plurality of unit matching information, a matching value between an information group corresponding to the unit matching information and the text to be translated; The second proper noun in the information group with the highest matching value is selected as the target translation of the first proper noun.
2. The translation method according to claim 1, characterized in that: The step of identifying a first proper noun in the text to be translated comprises: Identifying proper nouns to be translated in the text to be translated, wherein the proper nouns to be translated are in Chinese pinyin format; According to the Chinese naming rules, the proper noun to be translated is adjusted to a name with the surname first and the given name last; The adjusted name is used as the first recognized proper noun.
3. The translation method according to claim 1, characterized in that: The querying, based on the first proper noun, of a plurality of second proper nouns corresponding to the first proper noun and attribute information associated with each of the second proper nouns includes: Based on the first proper noun, obtaining a knowledge graph associated with a category referred to by the first proper noun; According to the knowledge graph, query a plurality of second proper nouns corresponding to the first proper noun; According to the second proper nouns and the knowledge graph, attribute information associated with each second proper noun is queried.
4. The translation method according to claim 1, characterized in that: The performing semantic matching based on the text to be translated and the plurality of information groups, and selecting the second proper noun corresponding to the information group with the highest semantic matching degree among the plurality of information groups as the target translation of the first proper noun, comprises: Based on the plurality of information groups, respectively determining the unused attribute information in each of the information groups; Performing semantic matching between the unused attribute information in each of the information groups and the text to be translated, to obtain a matching value for each of the information groups; The second proper noun in the information group with the highest matching value is selected as the target translation of the first proper noun.
5. The translation method according to claim 1, characterized in that: The method further comprises: Using a preset word to replace the first proper noun in the text to be translated; Translating the text to be translated containing the preset words to obtain a target translation text containing the preset words; The second proper noun determined as the target translation is used to replace the preset word in the target translation text.
6. A translation device, applied to a translation device, characterized in that: The device comprises: A recognition module, used for recognizing a first proper noun in a text to be translated, wherein the first proper noun is in a Chinese pinyin format; A query module, configured to query, based on the first proper noun, a plurality of second proper nouns corresponding to the first proper noun, and attribute information associated with each of the second proper nouns, wherein the second proper nouns are in Chinese character format; wherein the plurality of second proper nouns corresponding to the first proper noun means that the Chinese characters of the plurality of second proper nouns are different, but the pronunciations of the second proper nouns with different Chinese characters are all the same; and query, based on a knowledge graph associated with a category referred to by the first proper noun, the attribute information associated with each of the second proper nouns; a creation module, configured to create, based on a plurality of the second proper nouns, an information group corresponding to each of the second proper nouns, each of the information groups comprising the first proper noun, the second proper noun, and attribute information associated with the second proper noun; A matching module, configured to perform semantic matching based on the text to be translated and the plurality of information groups, and select the second proper noun corresponding to the information group with the highest semantic matching degree among the plurality of information groups as the target translation of the first proper noun; Wherein, the creation module is specifically used for: Translating the attribute information associated with each of the second proper nouns to obtain standby attribute information, wherein the standby attribute information is in the same language as the text to be translated; creating an information group corresponding to each of the second proper nouns, each of the information groups including the first proper noun, the second proper noun, and the to-be-used attribute information associated with the second proper noun; When the text to be translated includes a plurality of units to be translated divided according to a preset manner, the creation module is further specifically used for: Based on the plurality of information groups, respectively determining the unused attribute information in each of the information groups; Semantically matching the unused attribute information in each of the information groups with each of the units to be translated, and determining a plurality of unit matching information obtained by semantically matching the same information group with a plurality of the units to be translated; Determining, based on the plurality of unit matching information, a matching value between an information group corresponding to the unit matching information and the text to be translated; The second proper noun in the information group with the highest matching value is selected as the target translation of the first proper noun.
7. The translation device according to claim 6, characterized in that: The identification module is specifically used for: Identifying proper nouns to be translated in the text to be translated, wherein the proper nouns to be translated are in Chinese pinyin format; According to the Chinese naming rules, the proper name to be translated is adjusted to a name with the surname first and the given name last; The adjusted name is used as the first recognized proper noun.
8. The translation device according to claim 6, characterized in that: The query module is specifically used for: Based on the first proper noun, obtaining a knowledge graph associated with a category referred to by the first proper noun; According to the knowledge graph, query a plurality of second proper nouns corresponding to the first proper noun; According to the second proper nouns and the knowledge graph, attribute information associated with each second proper noun is queried.
9. The translation device according to claim 6, characterized in that: The creation module is specifically used for: Based on the plurality of information groups, respectively determining the unused attribute information in each of the information groups; Performing semantic matching between the unused attribute information in each of the information groups and the text to be translated, to obtain a matching value for each of the information groups; The second proper noun in the information group with the highest matching value is selected as the target translation of the first proper noun.
10. The translation device according to claim 6, characterized in that: The device also includes a translation module, which is used to: Using a preset word to replace the first proper noun in the text to be translated; Translating the text to be translated containing the preset words to obtain a target translation text containing the preset words; The second proper noun determined as the target translation is used to replace the preset word in the target translation text.
11. A translation device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the translation method according to any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by the processor of the mobile terminal, the translation device is enabled to perform the translation method according to any one of claims 1 to 5.
