Information translation method and apparatus, electronic device, and computer program product
By segmenting the document to be translated into sentences and identifying entity information, and using entity recognition and referential resolution models to correct gender entity information, the problem of gender information translation errors caused by the inability of neural machine translation engines to obtain contextual information is solved, thus achieving higher translation accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- IOL WUHAN INFORMATION TECH CO LTD
- Filing Date
- 2021-10-28
- Publication Date
- 2026-06-05
AI Technical Summary
Existing neural machine translation engines are unable to obtain contextual information from related sentences when translating sentences, leading to errors in the translation of gender information, especially in the translation of personal names.
By segmenting the document to be translated into sentences, identifying personal names and gender entity information, using entity recognition and referential resolution models to determine the relationships of target entity information, and using word alignment tools to correct gender entity information in the translated sentences.
It improved the accuracy of gender information translation, ensured consistency in the translation of names and gender information, and enhanced translation quality.
Smart Images

Figure CN116050436B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of text processing technology, and in particular to an information translation method, apparatus, electronic device, and computer program product. Background Technology
[0002] Current translation methods primarily combine machine translation engines with human translators. This involves an initial machine translation followed by post-editing by a human translator. The main machine translation engine used is the neural machine translation engine (NMI). When translating documents using a NMI, the source document is first broken down into sentences for independent translation, and then the translated sentences are merged back into the original document. However, NMI can only translate each sentence based on the information of the current sentence and cannot access the contextual information of related sentences. This leads to errors in the translated information for sentences that partially rely on contextual information. The most typical error in sentence translation is related to gender information. For example, if the source sentence contains a name, but the corresponding gender information cannot be translated from the current sentence, the gender information will be translated incorrectly. Summary of the Invention
[0003] This application provides an information translation method, apparatus, electronic device, and computer program product, aimed at improving the accuracy of gender information translation.
[0004] Firstly, this application provides an information translation method, including:
[0005] The sentences in the document to be translated are segmented into individual sentences to be processed.
[0006] Based on the name entity information and gender entity information in each of the sentences to be processed, determine the relationship between each target entity information;
[0007] Each of the sentences to be processed is translated to obtain the translated sentences.
[0008] Based on the relationships between the target entities, correct the gender entity information in each of the translated clauses.
[0009] In one embodiment, the step of correcting the gender entity information in each of the translated sentences based on the relationships between the target entity information includes:
[0010] Determine the target translation clause in each of the translated clauses, wherein the target translation clause carries personal name entity information and gender entity information;
[0011] Determine the target translation clause as the target processing clause within each of the clauses to be processed;
[0012] Based on the target entity information relationship of the target processing clause, correct the gender entity information in the target translation clause.
[0013] The step of correcting the gender entity information in the target translated sentence based on the target entity information relationship of the target processed sentence includes:
[0014] The target translation sentence and the target processing sentence are aligned using a word alignment tool, and the target gender entity information of the target translation sentence is determined by the target entity information relationship of the target processing sentence.
[0015] The gender entity information of the personal name entity information in the target translated sentence is determined by the referential resolution model;
[0016] Based on the target gender entity information, correct the gender entity information in the target translated sentence.
[0017] The step of correcting the gender entity information in the target translated sentence based on the target gender entity information includes:
[0018] Determine whether the target gender entity information is consistent with the gender entity information in the target translated sentence;
[0019] If the target gender entity information is inconsistent with the gender entity information in the target translation clause, then the target gender entity information replaces the gender entity information in the target translation clause.
[0020] The step of determining the relationship between each target entity information based on the person name entity information and gender entity information in each of the sentences to be processed includes:
[0021] The entity recognition model is used to extract the personal name entity information from each of the sentences to be processed.
[0022] The gender entity information of the personal name entity information in each of the sentences to be processed is identified by the referential resolution model;
[0023] The relationships between the name entity information and the corresponding gender entity information in each of the sentences to be processed are determined.
[0024] Based on the relationships between the information of the entities to be processed, the relationships between the information of the target entities are determined.
[0025] The step of determining the information relationship of each target entity based on the information relationship of each entity to be processed includes:
[0026] Collect the relationships between entities with the same name to obtain a set of relationships between entities to be processed.
[0027] Determine the number of times each identical entity information relationship occurs in each set of entity information relationships to be processed;
[0028] The most frequently occurring identical entity information relationship in each set of entity information relationships to be processed is determined as the target entity information relationship in each set of entity information relationships to be processed.
[0029] After determining the number of occurrences of each identical entity information relationship in each set of entity information relationships to be processed, the method further includes:
[0030] If the number of occurrences of the same entity information relationship in each set of entity information relationships to be processed is equal, then the modifying entity information of the same entity information relationship in each set of entity information relationships to be processed is determined.
[0031] Based on the modifying entity information of each identical entity information relationship in each set of entity information relationships to be processed, the target entity information relationship of each set of entity information relationships to be processed is determined.
[0032] Secondly, this application also provides an information translation device, comprising:
[0033] The first module is used to segment sentences in the document to be translated, resulting in individual sentences to be processed.
[0034] The second determining module is used to determine the relationship between each target entity information based on the person name entity information and gender entity information in each of the sentences to be processed;
[0035] The first translation module is used to translate each of the sentences to be processed, and obtain each translated sentence;
[0036] The second translation module is used to correct the gender entity information in each of the translated sentences based on the relationships between the target entity information.
[0037] Thirdly, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the information translation method described in the first aspect.
[0038] Fourthly, this application also provides a computer program product, which includes a computer program that, when executed by the processor, implements the steps of the information translation method described in the first aspect.
[0039] The information translation method, apparatus, electronic device, and computer program product provided in this application establish a target entity information relationship between personal name entity information and gender entity information in the document to be translated during the process of translating gender information. When translating gender entity information in the translated sentence, the target entity information relationship is used as the context information for translating gender entity information. Based on the target entity information relationship, the gender entity information in the translated sentence is accurately translated, thereby improving the accuracy of gender information translation. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is one of the flowcharts illustrating the information translation method provided in this application;
[0042] Figure 2 This is the second flowchart illustrating the information translation method provided in this application;
[0043] Figure 3 This is the third flowchart illustrating the information translation method provided in this application;
[0044] Figure 4 This is a schematic diagram of the information translation device provided in this application;
[0045] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0047] The following is combined with Figures 1 to 5 This application describes the information translation methods, apparatus, electronic devices, and computer program products provided.
[0048] Specifically, this application provides an information translation method, referring to... Figure 1 , Figure 1 This is one of the flowcharts illustrating the information translation method provided in this application.
[0049] This application provides an embodiment of an information translation method. It should be noted that although the logical order is shown in the flowchart, under certain data conditions, the steps shown or described may be performed in a different order than that shown here.
[0050] This application uses an electronic device as an example of an execution subject, and the information translation system is one of the manifestations of the electronic device, but it does not limit the electronic device.
[0051] The information translation method provided in this application includes:
[0052] Step S10: Segment the sentences in the document to be translated to obtain individual sentences to be processed.
[0053] It should be noted that the document translation in this embodiment includes, but is not limited to, Chinese-English bilingual document translation, Chinese-Japanese bilingual document translation, and Chinese-German bilingual document translation. For clarity, this embodiment uses Chinese-English bilingual document translation as an example; therefore, the document to be translated in this embodiment is a Chinese document.
[0054] Furthermore, this embodiment also uses a neural machine translation engine for document translation. Therefore, after the information translation system receives the input Chinese document to be translated, it splits the input Chinese document to be translated according to the punctuation splitting method, and splits the sentences in the input Chinese document to be translated into multiple Chinese sentences to be processed. The punctuation splitting method includes, but is not limited to, the period punctuation splitting method, the exclamation mark punctuation splitting method, and the semicolon punctuation splitting method.
[0055] In this embodiment, for example, the punctuation mark splitting method is the period punctuation mark splitting method. The input Chinese document to be translated is "Xia Lin walked downstairs to Liu Lu's building and waited for Liu Lu under a big tree. After waiting for a while, Xia Lin turned around and saw Liu Lu, who was dressed very neatly. Xia Lin couldn't help but praise Liu Lu." Based on the period punctuation mark, two Chinese sentences to be processed can be obtained. The two Chinese sentences to be processed are "Xia Lin walked downstairs to Liu Lu and waited for Liu Lu under a big tree" and "After waiting for a while, Xia Lin turned around and saw Liu Lu, who was dressed very neatly. Xia Lin couldn't help but praise Liu Lu."
[0056] Step S20: Determine the relationship between each target entity information based on the person name entity information and gender entity information in each of the sentences to be processed.
[0057] The information translation system uses a Named Entity Recognition (NAME) model to identify each Chinese sentence to be processed. Since the document to be translated in this embodiment is a Chinese document, the entity recognition model is a Chinese entity recognition model. This can be further understood as the information translation system using the Chinese entity recognition model to identify each Chinese sentence to be processed and extract the Chinese personal name entity information from each Chinese sentence to be processed. Next, the information translation system identifies the Chinese gender entity information of each Chinese personal name entity information through the coreference resolution model. Since the document to be translated in this embodiment is a Chinese document to be translated, the coreference resolution model is a Chinese coreference resolution model. It can be further understood that the information translation system identifies the Chinese gender entity information of each Chinese personal name entity information through the Chinese coreference resolution model, and determines the relationship between each target Chinese entity information and each Chinese gender entity information based on the association between each Chinese personal name entity information and each Chinese gender entity information, as described in steps S201 to S204. Here, the Chinese personal name entity information is the Chinese name, and the Chinese gender entity information is the Chinese gender pronoun (such as male, female).
[0058] In this embodiment, the Chinese sentence to be processed is "Xia Lin turned around and found Liu Lu staring at him". The Chinese entity recognition model is used to identify the Chinese sentence to be processed, and the Chinese personal name entity information is "Xia Lin" and "Liu Lu" and the Chinese gender entity information is "he". The "Xia Lin" determined by the Chinese referential resolution model is [Xia Lin, he].
[0059] Step S30: Translate each of the sentences to be processed to obtain each translated sentence.
[0060] Since this embodiment is a Chinese-English bilingual document translation, the information translation system uses a machine translation engine to translate each Chinese sentence to be processed into English, resulting in each English translation sentence.
[0061] Step S40: Correct the gender entity information in each of the translated sentences according to the relationship between the target entity information.
[0062] The information translation system filters each English translation clause based on English personal name entity information and English gender entity information. Clauses containing both English personal name entity information and English gender entity information are retained and designated as the target English translation clauses. The remaining English translation clauses do not require gender entity information correction. Here, English personal name entity information refers to English names, and English gender entity information refers to English gender pronouns (such as he, she, his, her, himself, herself, him, and hers). Next, the information translation system translates the English gender entity information in the target English translation clause based on the target Chinese entity information relationship between the target English translation clause and the Chinese clause to be processed. It should be noted that the focus of the translation mentioned in this embodiment is on correcting the English gender entity information in the target English translation clause through the target Chinese entity information relationship between the target English translation clause and the Chinese clause to be processed, as described in steps S401 to S403.
[0063] This embodiment provides an information translation method. In the process of translating gender information, a target entity information relationship is established between the name entity information and the gender entity information in the document to be translated. When translating the gender entity information in the translated sentence, the target entity information relationship is used as the context information for translating the gender entity information. Based on the target entity information relationship, the gender entity information in the translated sentence is accurately translated, thereby improving the accuracy of gender information translation.
[0064] Furthermore, referring to Figure 2 , Figure 2 This is the second flowchart of the information translation method provided in this application, wherein step S40 includes:
[0065] Step S401: Determine the target translation clause in each of the translated clauses, wherein the target translation clause carries personal name entity information and gender entity information;
[0066] Step S402: Determine the target processing sentence among the various sentences to be processed;
[0067] Step S403: Correct the gender entity information in the target translation sentence based on the target entity information relationship of the target processing sentence.
[0068] Specifically, the information translation system identifies English translation clauses that carry both English personal name entity information and English gender entity information as target English translation clauses among all English translation clauses. Here, "target English translation clause" is a general term and does not mean there is only one. It should be noted that English translation clauses that do not carry English personal name entity information, or do not carry English gender entity information, or do not carry either English personal name entity information or English gender entity information, are not processed in any way.
[0069] In this embodiment, for example, English translation clause 1 is "Xia Lin couldn't help praising Liu Lu", and English translation clause 2 is "Xia Lin turned around and found Liu Lu was watching him". English translation clause 1 only carries English personal name entity information, so there is no need to correct the gender entity information in English translation clause 1. English translation clause 2 carries both English personal name entity information and English gender entity information, so English translation clause 2 is determined as the target English translation clause.
[0070] Finally, the information translation system determines the target Chinese sentence to be processed in each Chinese sentence to be processed, and corrects the English gender entity information in the target English sentence according to the target Chinese entity information relationship of the target Chinese sentence to be processed, as described in steps S4031 to S4033.
[0071] In the process of translating gender information, the target entity information relationship serves as the contextual information for translating gender entity information. Based on the target entity information relationship, the gender entity information in the translated sentence is accurately translated, thereby improving the accuracy of gender information translation.
[0072] Furthermore, the specific descriptions of steps S4031 to S4033 are as follows:
[0073] Step S4031: Align the target translation sentence with the target processing sentence using a word alignment tool, and determine the target gender entity information of the target translation sentence based on the target entity information relationship of the target processing sentence;
[0074] Step S4032: Determine the gender entity information of the personal name entity information in the target translation sentence through the referential resolution model;
[0075] Step S4033: Correct the gender entity information in the target translation sentence based on the target gender entity information.
[0076] Specifically, the information translation system uses a word alignment tool to align the target English translation sentence with the target Chinese sentence, and determines the target English gender entity information of the target English translation sentence by using the target Chinese entity information relationship of the target Chinese sentence.
[0077] Next, the information translation system determines the gender entity information corresponding to the personal name entity information in the target English translation clause using a referential resolution model. Since the target translation clause in this embodiment is the target English translation clause, the referential resolution model is an English referential resolution model. This can be further understood as the information translation system determining the English gender entity information corresponding to the English personal name entity information in the target English translation clause using an English referential resolution model. Finally, the information translation system compares the target English gender entity information with the English gender entity information in the target English translation clause to obtain a comparison result. Based on the comparison result, the system corrects the English gender entity information in the target English translation clause. The comparison result can be that the target English gender entity information is consistent with the English gender entity information in the target English translation clause, or it can be inconsistent, as described in steps S40331 to S40332.
[0078] In this embodiment, for example, the target Chinese entity information relationship for "Xia Lin" is determined to be [Xia Lin, female] based on the Chinese document to be translated. When correcting the gender entity information in the English translation sentence "Xia Lin turned around and found Liu Lu was watching him", based on "Xia Lin" in the English translation sentence and the corresponding Chinese personal name entity information "Xia Lin" obtained according to the word alignment model, "Xia Lin" is determined to be female based on the target Chinese entity information relationship for "Xia Lin". Then, according to the English reference resolution model, the corresponding English gender entity information for "Xia Lin" is determined to be [Xia Lin, him], which is inconsistent with the gender of "Xia Lin" itself. Therefore, the translation "Xia Lin turned around and found Liu Lu was watching him" should be corrected to "Xia Lin turned around and found Liu Lu was watching her".
[0079] In the process of translating gender information, the target entity information relationship serves as the contextual information for translating gender entity information. Based on the target entity information relationship, the gender entity information in the translated sentence is accurately translated, thereby improving the accuracy of gender information translation.
[0080] Further, the specific descriptions of steps S40331 to S40332 are as follows:
[0081] Step S40331, determine whether the target gender entity information is consistent with the gender entity information in the target translated sentence clause;
[0082] Step S40332, if the target gender entity information is inconsistent with the gender entity information in the target translated sentence clause, then replace the gender entity information in the target translated sentence clause with the target gender entity information.
[0083] Specifically, the information translation system determines whether the target English gender entity information is consistent with the English gender entity information in the target English translated sentence clause. If it is determined that the target English gender entity information is consistent with the English gender entity information in the target English translated sentence clause, the information translation system determines that the translation is correct and there is no need to correct the English gender entity information in the target English translated sentence clause. If it is determined that the target English gender entity information is inconsistent with the English gender entity information in the target English translated sentence clause, the information translation system determines that the translation is incorrect and replaces the English gender entity information in the target English translated sentence clause with the target English gender entity information.
[0084] In this embodiment, for example, the Chinese sentence to be translated is "Xia Lin couldn't help praising Liu Lu when he saw her", and the corresponding English translation sentence is "Xia Lin couldn't help praising Liu Lu when he saw her". "Xia Lin" and "Liu Lu" are Chinese personal name entity information, but based on the Chinese sentence to be translated, it is impossible to judge the Chinese gender entity information of "Xia Lin" and "Liu Lu". The English gender pronouns "he" and "her" in the English translation sentence are related to the genders of "Xia Lin" and "Liu Lu". From the English translation sentence, it can be seen that the English translation sentence determines that "Xia Lin" corresponds to male and "Liu Lu" corresponds to female, but the actual situation may not be so. Therefore, it is necessary to determine the target Chinese entity information of "Xia Lin" and "Liu Lu", and determine whether it is necessary to correct the English translation sentence according to the target Chinese entity information.
[0085] In an application scenario, the target Chinese entity information of "Xia Lin" is [Xia Lin, male], and the target Chinese entity information of "Liu Lu" is [Liu Lu, female]. According to the English name entity information "Xia Lin" and "Liu Lu" in the English translation clause, and according to the word alignment model, it can be determined that the Chinese name entity information corresponding to "Xia Lin" is "Xia Lin", and the Chinese name entity information corresponding to "Liu Lu" is "Liu Lu". According to the target Chinese entity information of "Xia Lin" and the target Chinese entity information of "Liu Lu", it is determined that "Xia Lin" is male and "Liu Lu" is female. Then, according to the English anaphora resolution model, it is determined that "XiaLin" in the English translation clause is [Xia Lin, he], which is consistent with the gender of "Xia Lin" itself, and "Liu Lu" is [Liu Lu, her], which is consistent with the gender of "Liu Lu" itself. Then it is determined that the English translation sentence "Xia Lin couldn't help praising Liu Lu when he saw her" is correct.
[0086] In an application scenario, the target Chinese entity information of "Xia Lin" is [Xia Lin, male], and the target Chinese entity information of "Liu Lu" is [Liu Lu, male]. According to the English name entity information "Xia Lin" and "Liu Lu" in the English translation clause, and according to the word alignment model, it can be determined that the Chinese name entity information corresponding to "Xia Lin" is "Xia Lin", and the Chinese name entity information corresponding to "Liu Lu" is "Liu Lu". According to the target Chinese entity information of "Xia Lin" and the target Chinese entity information of "Liu Lu", it is determined that "Xia Lin" is male and "Liu Lu" is male. Then, according to the English anaphora resolution model, it is determined that "Xia Lin" in the English translation clause is [Xia Lin, he], which is consistent with the gender of "Xia Lin" itself, and "Liu Lu" is [Liu Lu, her], which is inconsistent with the gender of "LiuLu" itself. Then it is determined that the English translation sentence is incorrect, and [Liu Lu, her] is corrected to [Liu Lu, him], that is, the English translation sentence corresponding to the Chinese sentence to be translated "Xia Lin couldn't help praising Liu Lu when he saw her" is modified to "Xia Lin couldn't help praising Liu Lu when he saw him".
[0087] In an application scenario, the target Chinese entity information of "Xia Lin" is [Xia Lin, female], and the target Chinese entity information of "Liu Lu" is [Liu Lu, male]. According to the English names of the entity information "Xia Lin" and "Liu Lu" in the English translation clause, and according to the word alignment model, it can be determined that the Chinese name entity information corresponding to "Xia Lin" is "Xia Lin", and the Chinese name entity information corresponding to "Liu Lu" is "Liu Lu". According to the target Chinese entity information of "Xia Lin" and the target Chinese entity information of "Liu Lu", it is determined that "Xia Lin" is female and "Liu Lu" is male. Then, according to the English anaphora resolution model, it is determined that "XiaLin" in the English translation clause is [Xia Lin, he], which is inconsistent with the gender of "Xia Lin" itself, and "Liu Lu" is [Liu Lu, her], which is inconsistent with the gender of "Liu Lu" itself. Then it is determined that the English translation sentence is incorrect, and [Xia Lin, he] is corrected to [Xia Lin, she], and [Liu Lu, her] is corrected to [Liu Lu, him]. That is, the English translation sentence "XiaLin couldn't help praising Liu Lu when he saw her" corresponding to the Chinese sentence to be translated is modified to "Xia Lin couldn'thelp praising Liu Lu when she saw him".
[0088] In an application scenario, the target Chinese entity information of "Xia Lin" is [Xia Lin, female], and the target Chinese entity information of "Liu Lu" is [Liu Lu, female]. According to the English entity information of Chinese names "Xia Lin" and "Liu Lu" in the English translation clause, and according to the word alignment model, it can be determined that the Chinese name entity information corresponding to "Xia Lin" is "Xia Lin", and the Chinese name entity information corresponding to "Liu Lu" is "Liu Lu". According to the target Chinese entity information of "Xia Lin" and the target Chinese entity information of "Liu Lu", it is determined that "Xia Lin" is female and "Liu Lu" is female. Then, according to the English anaphora resolution model, it is determined that "XiaLin" in the English translation clause is [Xia Lin, he], which is inconsistent with the gender of "Xia Lin" itself, and "Liu Lu" is [Liu Lu, her], which is consistent with the gender of "LiuLu" itself. Then it is determined that the English translation sentence is incorrect, and [Xia Lin, he] is corrected to [Xia Lin, she], that is, the English translation sentence "Xia Lin couldn't help praising LiuLu when he saw her" corresponding to the Chinese sentence to be translated is modified to "Xia Lin couldn't help praising Liu Lu when she sawher".
[0089] In the embodiment of the present application, by the consistency between the target gender entity information and the gender entity information in the target translation clause, it is determined whether the gender entity information in the target translation clause is accurately translated, which improves the accuracy of gender information translation.
[0090] Further, referring to Figure 3 , Figure 3 is the third flow diagram of the information translation method provided by the present application, and the step S20 includes:
[0091] Step S201, extracting the person name entity information in each of the to-be-processed clauses through an entity recognition model;
[0092] Step S202, identifying the gender entity information of the person name entity information in each of the to-be-processed clauses through an anaphora resolution model;
[0093] Step S203, determining the relationship of each to-be-processed entity information according to the association relationship between the person name entity information in each of the to-be-processed clauses and its corresponding gender entity information;
[0094] Step S204, determining the relationship of each target entity information according to the relationship of each to-be-processed entity information.
[0095] The information translation system uses a Chinese entity recognition model to identify each Chinese sentence to be processed, extracting the Chinese personal name entity information from each sentence. Next, the system uses a Chinese referential resolution model to identify the Chinese gender entity information within each personal name entity. Based on the association between the various personal name entities and the various gender entities, the system determines the relationships between the various Chinese entity information to be processed. Finally, based on the frequency of occurrence of these relationships, the system determines the target Chinese entity information relationships between the various personal name entities and the various gender entities.
[0096] In this embodiment, the target entity information relationship between each person name entity information and each gender entity information is determined based on the number of occurrences of each entity information relationship to be processed. Since the number of occurrences represents the probability of occurrence, the probability of occurrence can accurately predict the future, thereby ensuring the accuracy of the target entity information relationship.
[0097] Furthermore, the specific descriptions of steps S2041 to S2043 are as follows:
[0098] Step S2041: Collect the entity information relationships to be processed for the same person name entity information to obtain a collection of entity information relationships to be processed.
[0099] Step S2042: Determine the number of times each identical entity information relationship occurs in each set of entity information relationships to be processed;
[0100] Step S2043: The most frequently occurring identical entity information relationship in each set of entity information relationships to be processed is determined as the target entity information relationship in each set of entity information relationships to be processed.
[0101] The information translation system uses Chinese personal name entity information as its basis, aggregating the unprocessed Chinese entity information relationships for the same Chinese personal name entity information to obtain various unprocessed Chinese entity information relationship sets. Next, the information translation system determines the frequency of occurrence of the same unprocessed Chinese entity information relationship in each unprocessed Chinese entity information relationship set. Finally, the information translation system identifies the unprocessed Chinese entity information relationship with the highest frequency in each unprocessed Chinese entity information relationship set as the target Chinese entity information relationship for that set.
[0102] In this embodiment, for example, the set of Chinese entity information relationships to be processed 1 contains the Chinese entity information relationship 1 "[Xia Lin, He]" and the Chinese entity information relationship 2 "[Xia Lin, She]". According to the statistics of the Chinese document to be translated, the number of occurrences of the Chinese entity information relationship 1 "[Xia Lin, He]" is 20, and the number of occurrences of the Chinese entity information relationship 2 "[Xia Lin, She]" is 2, which is less than 20. Therefore, it is determined that "Xia Lin" in the set of Chinese entity information relationships to be processed 1 is male. Thus, the target Chinese entity information relationship of the set of Chinese entity information relationships to be processed 1 is determined to be "[Xia Lin, Male]", that is, the target Chinese entity information relationship of "Xia Lin" is "[Xia Lin, Male]".
[0103] In this embodiment, the target entity information relationship of each set of entity information relationships to be processed is determined based on the number of occurrences of each identical entity information relationship to be processed. Since the number of occurrences represents the probability of occurrence, the probability of occurrence can accurately predict the future, thereby ensuring the accuracy of the target entity information relationship.
[0104] Furthermore, if it is determined that the number of occurrences of each identical Chinese entity information relationship in each set of Chinese entity information relationships to be processed is equal, the specific processing method is as described in steps S2044 to S2045.
[0105] Step S2044: If the number of occurrences of the same entity information relationship in each set of entity information relationships to be processed is equal, then determine the modifying entity information of the same entity information relationship in each set of entity information relationships to be processed.
[0106] Step S2045: Determine the target entity information relationship for each set of entity information relationships to be processed based on the modified entity information of each identical entity information relationship in each set of entity information relationships to be processed.
[0107] Specifically, the information translation system needs to determine the modifying entity information of each identical Chinese entity information relationship in each set of Chinese entity information relationships to be processed. The modifying entity information includes, but is limited to, "beautiful," "pretty," "handsome," and "strong." Next, the information translation system determines whether each identical Chinese entity information relationship in each set of Chinese entity information relationships matches its corresponding modifying entity information. Then, it identifies the target Chinese entity information relationship for each set of Chinese entity information relationships that matches the modifying entity information.
[0108] In this embodiment, for example, the set of Chinese entity information relationships to be processed 2 contains the Chinese entity information relationship 1 "[Xia Lin, He]" and the Chinese entity information relationship 2 "[Xia Lin, She]". According to the statistics of the Chinese documents to be translated, the number of occurrences of the Chinese entity information relationship 1 "[Xia Lin, He]" is 20, and the number of occurrences of the Chinese entity information relationship 2 "[Xia Lin, She]" is 20. It is further determined that the modifying entity information of the Chinese entity information relationship 1 "[Xia Lin, He]" is "strong", which matches the Chinese entity information relationship 1. The modifying entity information of the Chinese entity information relationship 2 "[Xia Lin, She]" is "handsome", which does not match the Chinese entity information relationship 2. Therefore, it is determined that "Xia Lin" in the set of Chinese entity information relationships to be processed 2 is male. Therefore, the target Chinese entity information relationship of the set of Chinese entity information relationships to be processed 2 is determined to be "[Xia Lin, Male]", that is, the target Chinese entity information relationship of "Xia Lin" is "[Xia Lin, Male]".
[0109] This application embodiment determines the target entity information relationship of each set of entity information relationships to be processed by modifying the modified entity information of each set of entity information relationships to be processed. Since the occurrence frequency represents the occurrence probability, the occurrence probability can accurately predict the future, thereby ensuring the accuracy of the target entity information relationship.
[0110] Furthermore, the information translation apparatus provided in this application will be described below, and the information translation apparatus described below can be referred to in correspondence with the information translation method described above.
[0111] like Figure 4 As shown, Figure 4 This is a schematic diagram of the information translation device provided in this application. The information translation device includes:
[0112] The first determining module 401 is used to segment sentences in the document to be translated to obtain individual sentences to be processed;
[0113] The second determining module 402 is used to determine the relationship between each target entity information based on the person name entity information and gender entity information in each of the sentences to be processed;
[0114] The first translation module 403 is used to translate each of the sentences to be processed to obtain each translated sentence;
[0115] The second translation module 404 is used to correct the gender entity information in each of the translated sentences based on the relationship between the target entity information.
[0116] Furthermore, the second translation module 404 is also used for:
[0117] Determine the target translation clause in each of the translated clauses, wherein the target translation clause carries personal name entity information and gender entity information;
[0118] Determine the target translation clause as the target processing clause within each of the clauses to be processed;
[0119] Based on the target entity information relationship of the target processing clause, correct the gender entity information in the target translation clause.
[0120] Furthermore, the second translation module 404 is also used for:
[0121] The target translation sentence and the target processing sentence are aligned using a word alignment tool, and the target gender entity information of the target translation sentence is determined by the target entity information relationship of the target processing sentence.
[0122] The gender entity information of the personal name entity information in the target translated sentence is determined by the referential resolution model;
[0123] Based on the target gender entity information, correct the gender entity information in the target translated sentence.
[0124] Furthermore, the second translation module 404 is also used for:
[0125] Determine whether the target gender entity information is consistent with the gender entity information in the target translated sentence;
[0126] If the target gender entity information is inconsistent with the gender entity information in the target translation clause, then the target gender entity information replaces the gender entity information in the target translation clause.
[0127] Furthermore, the second determining module 402 is also used for:
[0128] The entity recognition model is used to extract the personal name entity information from each of the sentences to be processed.
[0129] The gender entity information of the personal name entity information in each of the sentences to be processed is identified by the referential resolution model;
[0130] The relationships between the name entity information and the corresponding gender entity information in each of the sentences to be processed are determined.
[0131] Based on the relationships between the information of the entities to be processed, the relationships between the information of the target entities are determined.
[0132] Furthermore, the second determining module 402 is also used for:
[0133] Collect the relationships between entities with the same name to obtain a set of relationships between entities to be processed.
[0134] Determine the number of times each identical entity information relationship occurs in each set of entity information relationships to be processed;
[0135] The most frequently occurring identical entity information relationship in each set of entity information relationships to be processed is determined as the target entity information relationship in each set of entity information relationships to be processed.
[0136] Furthermore, the second determining module 402 is also used for:
[0137] If the number of occurrences of the same entity information relationship in each set of entity information relationships to be processed is equal, then the modifying entity information of the same entity information relationship in each set of entity information relationships to be processed is determined.
[0138] Based on the modifying entity information of each identical entity information relationship in each set of entity information relationships to be processed, the target entity information relationship of each set of entity information relationships to be processed is determined.
[0139] The specific embodiments of the information translation device provided in this application are basically the same as the embodiments of the information translation method described above, and will not be repeated here.
[0140] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include: a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communications interface 520, and the memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute an information translation method, which includes:
[0141] The sentences in the document to be translated are segmented into individual sentences to be processed.
[0142] Based on the name entity information and gender entity information in each of the sentences to be processed, determine the relationship between each target entity information;
[0143] Each of the sentences to be processed is translated to obtain the translated sentences.
[0144] Based on the relationships between the target entities, correct the gender entity information in each of the translated clauses.
[0145] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0146] On the other hand, this application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer is able to execute the information translation method provided by the above methods, the method including:
[0147] The sentences in the document to be translated are segmented into individual sentences to be processed.
[0148] Based on the name entity information and gender entity information in each of the sentences to be processed, determine the relationship between each target entity information;
[0149] Each of the sentences to be processed is translated to obtain the translated sentences.
[0150] Based on the relationships between the target entities, correct the gender entity information in each of the translated clauses.
[0151] In another aspect, this application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the information translation methods provided above, the method comprising:
[0152] The sentences in the document to be translated are segmented into individual sentences to be processed.
[0153] Based on the name entity information and gender entity information in each of the sentences to be processed, determine the relationship between each target entity information;
[0154] Each of the sentences to be processed is translated to obtain the translated sentences.
[0155] Based on the relationships between the target entities, correct the gender entity information in each of the translated clauses.
[0156] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0157] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0158] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An information translation method, characterized in that, include: The sentences in the document to be translated are segmented into individual sentences to be processed. Based on the personal name entity information and gender entity information in each of the sentences to be processed, the relationship between each target entity information is determined, wherein the gender entity information is a gender pronoun; Each of the sentences to be processed is translated to obtain the translated sentences. Based on the relationships between the target entity information, correct the gender entity information in each of the translated clauses; The step of determining the relationship between each target entity information based on the person name entity information and gender entity information in each of the sentences to be processed includes: The entity recognition model is used to extract the personal name entity information from each of the sentences to be processed. The gender entity information of the personal name entity information in each of the sentences to be processed is identified by the referential resolution model; The relationships between the name entity information and the corresponding gender entity information in each of the sentences to be processed are determined. Based on the relationships between the information of the entities to be processed, determine the relationships between the information of the target entities; The step of determining the information relationship of each target entity based on the information relationship of each entity to be processed includes: Collect the relationships between entities with the same name to obtain a set of relationships between entities to be processed. Determine the number of times each identical entity information relationship occurs in each set of entity information relationships to be processed; The most frequently occurring identical entity information relationship in each set of entity information relationships to be processed is determined as the target entity information relationship in each set of entity information relationships to be processed. If the number of occurrences of the same entity information relationship in each set of entity information relationships to be processed is equal, then the modifying entity information of the same entity information relationship in each set of entity information relationships to be processed is determined. Based on the modifying entity information of each identical entity information relationship in each set of entity information relationships to be processed, the target entity information relationship of each set of entity information relationships to be processed is determined.
2. The information translation method according to claim 1, characterized in that, The step of correcting the gender entity information in each translated sentence based on the relationships between the target entity information includes: Determine the target translation clause in each of the translated clauses, wherein the target translation clause carries personal name entity information and gender entity information; Determine the target translation clause as the target processing clause within each of the clauses to be processed; Based on the target entity information relationship of the target processing clause, correct the gender entity information in the target translation clause.
3. The information translation method according to claim 2, characterized in that, The step of correcting the gender entity information in the target translated sentence based on the target entity information relationship of the target processed sentence includes: The target translation sentence and the target processing sentence are aligned using a word alignment tool, and the target gender entity information of the target translation sentence is determined by the target entity information relationship of the target processing sentence. The gender entity information of the personal name entity information in the target translated sentence is determined by the referential resolution model; Based on the target gender entity information, correct the gender entity information in the target translated sentence.
4. The information translation method according to claim 3, characterized in that, The step of correcting the gender entity information in the target translated sentence based on the target gender entity information includes: Determine whether the target gender entity information is consistent with the gender entity information in the target translated sentence; If the target gender entity information is inconsistent with the gender entity information in the target translation clause, then the target gender entity information replaces the gender entity information in the target translation clause.
5. An information translation device, characterized in that, include: The first module is used to segment sentences in the document to be translated, resulting in individual sentences to be processed. The second determining module is used to determine the relationship between each target entity information based on the person name entity information and gender entity information in each of the sentences to be processed, wherein the gender entity information is a gender pronoun; The first translation module is used to translate each of the sentences to be processed, and obtain each translated sentence; The second translation module is used to correct the gender entity information in each of the translated sentences based on the relationships between the target entity information. The step of determining the relationship between each target entity information based on the person name entity information and gender entity information in each of the sentences to be processed includes: The entity recognition model is used to extract the personal name entity information from each of the sentences to be processed. The gender entity information of the personal name entity information in each of the sentences to be processed is identified by the referential resolution model; The relationships between the name entity information and the corresponding gender entity information in each of the sentences to be processed are determined. Based on the relationships between the information of the entities to be processed, determine the relationships between the information of the target entities; The step of determining the information relationship of each target entity based on the information relationship of each entity to be processed includes: Collect the relationships between entities with the same name to obtain a set of relationships between entities to be processed. Determine the number of times each identical entity information relationship occurs in each set of entity information relationships to be processed; The most frequently occurring identical entity information relationship in each set of entity information relationships to be processed is determined as the target entity information relationship in each set of entity information relationships to be processed. If the number of occurrences of the same entity information relationship in each set of entity information relationships to be processed is equal, then the modifying entity information of the same entity information relationship in each set of entity information relationships to be processed is determined. Based on the modifying entity information of each identical entity information relationship in each set of entity information relationships to be processed, the target entity information relationship of each set of entity information relationships to be processed is determined.
6. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the information translation method according to any one of claims 1 to 4.
7. A computer program product, said computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the information translation method according to any one of claims 1 to 4.