Text translation method and device, equipment and storage medium
Through the collaborative work of multi-angle analysis and task allocation agents, the problem of lack of multi-view and multi-level semantic understanding in existing machine translation technology is solved, and more accurate and smooth translation results are achieved, reaching the standard of truth and elegance.
Patent Information
- Application Number
- CN202411539532.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-30
AI Technical Summary
The existing machine translation technology lacks multi-perspective and multi-level semantic understanding capabilities, which leads to insufficient translation results in semantic coherence, context adaptability and cultural communication, and it is difficult to meet the standard of "trustworthiness and elegance".
A text translation method is proposed. By obtaining the initial text and inputting its corresponding translation elements into the grammatical analysis agent, rhetorical understanding agent and cultural background agent for multi-angle analysis, we obtain grammatical analysis data, rhetorical analysis data and cultural analysis. data. Then, the task allocation agent is used to allocate tasks, generate initial analysis data, and input it into the text to translate the agent for translation processing to obtain the translated text.
Through the collaborative work of multi-angle analysis and task allocation agents, the accuracy and fluency of translation results are improved, and the semantics, rhetoric and cultural background of the original text can be better understood and conveyed, and the realization of a reliable and elegant translation effect can be achieved.
Smart Images

Figure HDA0005112518080000011 
Figure HDA0005112518080000021 
Figure HDA0005112518080000031
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of text translation, and in particular to a text translation method, apparatus, device and storage medium. Background Art
[0002] As one of the important applications in the field of natural language processing, machine translation technology aims to automatically convert one language into another through computer programs. With the advancement of globalization and the increase in cross-cultural communication, machine translation plays an increasingly important role in promoting international communication and information acquisition.
[0003] Neural network models are usually used in related technologies to implement the translation process. However, related neural network models usually rely on a single network architecture and lack multi-perspective and multi-level semantic understanding capabilities. As a result, the current translation results are insufficient in semantic coherence, contextual adaptability and cultural communication, making it difficult to meet the standards of "faithfulness, expressiveness and elegance". Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a text translation method, apparatus, device and storage medium to improve the accuracy of the translation results.
[0005] To achieve the above purpose, a first aspect of an embodiment of the present application proposes a text translation method, comprising:
[0006] Obtaining an initial text, and obtaining a translation element corresponding to the initial text;
[0007] Input the translation elements into a grammar analysis agent, a rhetoric understanding agent, and a cultural background agent for multi-angle analysis, and obtain corresponding grammar analysis data, rhetoric analysis data, and cultural analysis data;
[0008] Inputting the initial text, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data into a task assignment agent for task assignment, thereby obtaining a first proportion of the grammatical parsing data, a second proportion of the rhetorical parsing data and a third proportion of the cultural parsing data;
[0009] generating initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data, and the cultural parsing data;
[0010] The initial text and the initial parsed data are input into a text translation agent for translation processing to obtain a translated text of the initial text.
[0011] In some embodiments, before generating the initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data, and the cultural parsing data, the method further includes:
[0012] Inputting the initial text, the first ratio, the second ratio and the third ratio into an interactive evaluation agent for data evaluation to generate evaluation data;
[0013] If the evaluation data indicates that at least one of the first ratio, the second ratio and the third ratio needs to be adjusted, the evaluation data is sent to the task assignment agent, and the task assignment agent is used to regenerate the first ratio, the second ratio and the third ratio according to the evaluation data, the initial text, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data until the evaluation data indicates that no adjustment is required.
[0014] In some embodiments, generating initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data, and the cultural parsing data includes:
[0015] Acquire first characteristic information of the grammatical analysis data, acquire second characteristic information of the rhetorical analysis data, and acquire third characteristic information of the cultural analysis data;
[0016] The first ratio is multiplied by the first characteristic information, the second ratio is multiplied by the second characteristic information, and the third ratio is multiplied by the third characteristic information, and the multiplication results are added to obtain the initial parsed data.
[0017] In some embodiments, the step of inputting the initial text and the initial parsed data into a text translation agent for translation processing to obtain a translated text of the initial text includes:
[0018] Optimize and adjust the translation process according to the initial text and the initial parsed data to obtain translation reference data;
[0019] The initial text and the translation reference data are input into the text translation agent for translation processing to obtain the translated text.
[0020] In some embodiments, the optimizing and adjusting the translation process according to the initial text and the initial parsed data to obtain translation reference data includes:
[0021] Taking the initial text and the initial parsed data as input data;
[0022] Inputting the input data into a grammar translation agent for grammar translation to obtain grammar translation data;
[0023] Inputting the input data into a semantic translation agent for semantic translation to obtain semantic translation data;
[0024] Inputting the input data into a style translation agent for style translation to obtain style translation data;
[0025] The translation reference data is obtained according to the grammatical translation data, the semantic translation data and the style translation data.
[0026] In some embodiments, the step of inputting the initial text and the translation reference data into the text translation agent for translation processing to obtain the translated text includes:
[0027] Inputting the initial text and the translation reference data into the text translation agent for translation processing to obtain comprehensive translation data;
[0028] The comprehensive translation data is optimized and adjusted to obtain the translation text.
[0029] In some embodiments, the step of optimizing and adjusting the translation of the comprehensive translation data to obtain the translation text includes:
[0030] Inputting the comprehensive translation data into a fluency optimization agent to adjust the fluency to obtain fluency optimization data;
[0031] Inputting the comprehensive translation data into a style optimization agent to perform style optimization to obtain style translation data;
[0032] Inputting the comprehensive translation data into a consistency optimization agent to perform consistency optimization to obtain consistency optimization data;
[0033] The fluency optimization data, the style translation data and the consistency optimization data are input into a data coordination intelligent agent for information integration to obtain the translation text.
[0034] In some embodiments, the method further comprises:
[0035] Acquiring a target document format, and adjusting the format of the translation text based on the target document format to obtain a formatted output text;
[0036] Performing grammar check and / or spelling check on the format output text to obtain a final translated text.
[0037] In some embodiments, obtaining the translation element corresponding to the initial text includes:
[0038] Segmenting the initial text to obtain at least one text segmentation;
[0039] Performing part-of-speech tagging on the text segmentation to obtain part-of-speech data corresponding to each of the text segmentation;
[0040] Performing syntactic analysis on the initial text to obtain syntactic component data;
[0041] The translation element is obtained based on the text segmentation, the part-of-speech data and the syntactic component data.
[0042] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a text translation device, comprising:
[0043] Data acquisition module: used to acquire the initial text and the translation elements corresponding to the initial text;
[0044] Multi-angle analysis module: used to input the translation elements into the grammar analysis agent, rhetoric understanding agent and cultural background agent respectively for multi-angle analysis, and obtain corresponding grammar analysis data, rhetoric analysis data and cultural analysis data;
[0045] Task assignment module: used for inputting the initial text, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data into a task assignment agent for task assignment, and obtaining a first proportion of the grammatical parsing data, a second proportion of the rhetorical parsing data and a third proportion of the cultural parsing data;
[0046] An initial data generation module: used for generating initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data;
[0047] Translation processing module: used for inputting the initial text and the initial parsed data into the text translation agent for translation processing to obtain the translated text of the initial text.
[0048] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0049] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a storage medium, which is a storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0050] The text translation method, apparatus, device and storage medium proposed in the embodiments of the present application obtain an initial text and translation elements corresponding to the initial text, respectively input the translation elements into a grammatical parsing agent, a rhetorical understanding agent and a cultural background agent for multi-angle analysis, and obtain corresponding grammatical parsing data, rhetorical parsing data and cultural parsing data, input the initial text, grammatical parsing data, rhetorical parsing data and cultural parsing data into a task allocation agent for task allocation, and obtain a first proportion of the grammatical parsing data, a second proportion of the rhetorical parsing data and a third proportion of the cultural parsing data, generate initial parsing data according to the first proportion, the second proportion, the third proportion, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data, and finally input the initial text and the initial parsing data into a translation agent for translation processing to obtain a translated text of the initial text. In the embodiment of the present application, different translation angles such as grammar, rhetoric and cultural background are analyzed respectively, and then the proportion of analysis results of different translation angles is determined based on the initial text through task allocation of the intelligent agent, so as to obtain initial analysis data, and the translation result of the initial text is adjusted based on the initial analysis data. In combination with the collective wisdom of multiple intelligent agents, information such as rhetoric and cultural differences is comprehensively utilized in the translation process to achieve a faithful, expressive and elegant translation effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a flowchart of the text translation method provided in the embodiment of the present application.
[0052] Figure 2 It is an overall flow chart of the text translation method provided in the embodiment of the present application.
[0053] Figure 3 It is a flowchart of obtaining translation elements corresponding to the initial text provided by an embodiment of the present application.
[0054] Figure 4 It is a flow chart of adjusting the first ratio, the second ratio and the third ratio provided in an embodiment of the present application.
[0055] Figure 5 It is a flowchart of generating initial parsing data according to a first ratio, a second ratio, a third ratio, grammatical parsing data, rhetorical parsing data and cultural parsing data provided in an embodiment of the present application.
[0056] Figure 6 It is a flowchart of optimizing and adjusting the translation process according to the initial text and initial parsed data to obtain translation reference data provided by an embodiment of the present application.
[0057] Figure 7 It is a flowchart of optimizing and adjusting the translation of comprehensive translation data to obtain the translation text provided by the embodiment of the present application.
[0058] Figure 8 This is a structural block diagram of a text translation device provided in yet another embodiment of the present application.
[0059] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] It should be noted that although the functional modules are divided in the device schematic and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0063] First, some nouns involved in this application are analyzed:
[0064] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0065] As one of the important applications in the field of natural language processing, machine translation technology aims to automatically convert one language into another through computer programs. With the advancement of globalization and the increase in cross-cultural communication, machine translation plays an increasingly important role in promoting international communication and information acquisition.
[0066] In the related art, neural network models are usually used to implement the translation process. However, the related neural network models usually rely on a single network architecture and lack multi-perspective and multi-level semantic understanding capabilities, which leads to the current translation results being insufficient in semantic coherence, contextual adaptability and cultural communication, and it is difficult to meet the standards of "faithfulness, expressiveness and elegance". The so-called "faithfulness, expressiveness and elegance" means that the translation should not only be faithful to the meaning of the original text (faithfulness), but also be fluent (expressiveness) and have literary beauty (elegance). Therefore, the translation of faithfulness, expressiveness and elegance requires translating more complex languages, metaphorical expressions and cultural nuances in multiple languages. In order to make up for the translation disadvantages of a single neural network model, there are multi-model integration technologies in the related art to improve the accuracy and diversity of translation, effectively reduce common errors in translation, and improve the naturalness and fluency of the translation results to a certain extent. However, it still lacks multi-perspective semantic understanding capabilities. When faced with complex translation tasks, such as complex language structures, long sentences and sentences with complex grammar, it is often difficult to generate natural and accurate translations. Due to insufficient understanding of information such as rhetoric and cultural differences, it is difficult for the translation results to accurately convey the subtle meanings corresponding to these specific cultural backgrounds and contexts, and it is impossible to accurately express the specific culture, idioms and contexts. The translation may appear stiff or unnatural in the target language culture.
[0067] Based on this, the embodiments of the present application provide a text translation method, apparatus, device and storage medium, which analyzes different translation angles such as grammar, rhetoric and cultural background respectively, and then determines the proportion of analysis results of different translation angles based on the initial text through task allocation of intelligent agents, thereby obtaining initial analysis data, adjusting the translation results of the initial text based on the initial analysis data, and utilizing the collective wisdom of multiple intelligent agents based on the interaction process between multiple intelligent agents. In the translation process, information such as rhetoric and cultural differences is comprehensively utilized to achieve a faithful, expressive and elegant translation effect.
[0068] The embodiments of the present application provide a text translation method, apparatus, device and storage medium, which are specifically illustrated by the following embodiments. First, the text translation method in the embodiments of the present application is described.
[0069] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making.
[0070] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0071] The text translation method provided by the embodiment of the present application relates to the technical field of text translation. The text translation method provided by the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be a computer program running in a terminal or a server side. For example, a computer program can be a native program or a software module in an operating system; it can be a local (Native) application (Application, APP), that is, a program that needs to be installed in an operating system to run, such as a client that supports text translation, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be an application, module or plug-in in any form. Wherein, the terminal communicates with the server via a network. The text translation method can be executed by a terminal or a server, or by a terminal and a server in collaboration.
[0072] In some embodiments, the terminal may be a smart phone, a tablet computer, a laptop computer, a desktop computer or a smart watch, etc. In addition, the terminal may also be an intelligent vehicle-mounted device. The intelligent vehicle-mounted device applies the text translation method of this embodiment to provide related services and enhance the driving experience. The server may be an independent server, or it may be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms; it may also be a service node in a blockchain system, and each service node in the blockchain system forms a peer-to-peer (Peer To Peer, P2P) network, and the P2P protocol is an application layer protocol running on the Transmission Control Protocol (Transmission Control Protocol, TCP) protocol. The terminal and the server may be connected via Bluetooth, Universal Serial Bus (Universal Serial Bus, USB) or network communication connection methods, and this embodiment is not limited here.
[0073] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0074] The text translation method in the embodiment of the present application is described below.
[0075] Figure 1 is an optional flowchart of the text translation method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps 110 to 150. It can also be understood that this embodiment Figure 1 The order of step 110 to step 150 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.
[0076] Step 110: Obtain the initial text, and obtain the translation element corresponding to the initial text.
[0077] In one embodiment, the initial text is the source text that needs to be translated, which needs to be translated into a target language, wherein the target language and the language of the source text may be the same or different. When the two are the same, the translation process may be understood as a process of parsing the initial text, which is not limited in this embodiment.
[0078] Reference Figure 2 , Figure 2 This is an overall flow chart of the text translation method provided in the embodiment of the present application. Figure 2 After obtaining the initial text, preprocessing is required to obtain translation elements for participating in the subsequent translation process in order to improve the accuracy of the translation results.
[0079] In one embodiment, referring to Figure 3 , Figure 3 This is a flowchart of obtaining translation elements corresponding to the initial text provided by an embodiment of the present application, which specifically includes the following steps:
[0080] Step 310: Segment the initial text into words to obtain at least one text segmentation.
[0081] In one embodiment, the purpose of segmenting the initial text to obtain text segmentation is to more accurately identify each word in the initial text through the segmentation process, avoid misunderstanding polysemous words or phrases as single words, and help to more accurately understand the meaning of the initial text in the subsequent translation process.
[0082] Step 320: Perform part-of-speech tagging on the text segmentation to obtain part-of-speech data corresponding to each text segmentation.
[0083] In one embodiment, part-of-speech tagging is performed on each obtained text segmentation, so as to obtain part-of-speech data corresponding to each text segmentation. Part-of-speech tagging helps to understand the role of the text segmentation in the entire initial text.
[0084] Step 330: Perform syntactic analysis on the initial text to obtain syntactic component data.
[0085] In one embodiment, the purpose of syntactic analysis is to generate a syntax tree of the initial text as syntactic component data. The syntax tree can represent the overall structure of the initial text, which helps to accurately grasp the context and semantic relationship of the initial text during the translation process, thereby generating a more accurate translation.
[0086] Step 340: Obtain translation elements based on the text segmentation, part-of-speech data and syntactic component data.
[0087] In one embodiment, text segmentation, part-of-speech data and syntactic component data are used together as translation elements. The sentence structure of the initial text is contained in the translation elements. During the translation process, the vocabulary that is more in line with the expression habits of the target language can be more clearly selected to construct the translation of the initial text, and the word order and sentence structure can be adjusted according to the grammatical rules of the target language. While maintaining the accuracy of the translation, the style and tone of the initial text can be retained as much as possible by analyzing features such as part of speech and sentence structure, making the translation more natural and fluent.
[0088] Step 120: Input the translation elements into the grammar analysis agent, rhetoric understanding agent and cultural background agent respectively for multi-angle analysis to obtain corresponding grammar analysis data, rhetoric analysis data and cultural analysis data.
[0089] In one embodiment, referring to Figure 2 After obtaining the translation elements, the translation elements are used as input information for the grammar parsing agent, the rhetoric understanding agent and the cultural background agent respectively. The grammar parsing agent is used to perform preliminary analysis on the grammar to obtain grammar parsing data, the rhetoric understanding agent is used to perform preliminary analysis on the rhetoric to obtain rhetoric parsing data, and the cultural background agent is used to perform preliminary analysis on the cultural background to obtain cultural parsing data.
[0090] In one embodiment, the grammatical structure of the initial text is analyzed based on the translation elements by the grammatical parsing agent, so as to more accurately grasp the relationship between different text segmentations, understand the true meaning of the initial text, and avoid mistranslation caused by misunderstanding. Especially for the initial text containing multiple clauses or modifying components, the original information of the initial text can be accurately conveyed only by clarifying the grammatical relationship between each text segmentation. Therefore, the embodiment of the present application uses grammatical parsing data to save the grammatical information obtained by preliminary parsing.
[0091] In one embodiment, the rhetoric-related information of the initial text is analyzed based on the translation elements by a rhetoric understanding agent. Rhetoric, as an important means of language expression, carries rich emotional colors and cultural heritage. The embodiment of the present application uses a rhetoric understanding agent to carefully analyze the rhetoric in the initial text to obtain rhetoric analysis data, so as to more accurately grasp the meaning and emotional tone of the initial text. Among them, rhetoric can be such as metaphor, personification, symbol, metaphor, etc. In the subsequent translation process, the expression corresponding to the rhetoric in the initial text is found based on the target language to improve the accuracy and fluency of the translation results. It can be understood that the rhetoric understanding agent is trained based on a large number of figurative expressions, symbolic expressions, metaphorical expressions and other corpora to ensure the accuracy and cultural adaptability of the rhetoric analysis process.
[0092] In one embodiment, the cultural background of the initial text includes the history, tradition, custom, values and other deep information in the source language, which is often reflected in the form of metaphors, allusions, idioms and the like in the language. Therefore, the embodiment of the present application utilizes the cultural background intelligent agent to parse these cultural elements to obtain cultural analysis data. In the subsequent translation process, the cultural analysis data is used to more accurately understand the meaning and context of the initial text to avoid misunderstandings caused by literal translation. At the same time, the cultural analysis data can also be used to make appropriate cultural adaptation and conversion in the subsequent translation results, so that the translation results are closer to the cultural cognition of the target language, thereby improving the accuracy and readability of the translation results.
[0093] It is understandable that the above-mentioned different agents all have corresponding prompt words when inputting, which are used to guide the corresponding agents to perform target parsing operations, and this embodiment does not limit this.
[0094] Step 130: Input the initial text, grammatical parsing data, rhetorical parsing data and cultural parsing data into the task assignment agent for task assignment, and obtain a first proportion of grammatical parsing data, a second proportion of rhetorical parsing data and a third proportion of cultural parsing data.
[0095] In one embodiment, even if the grammatical parsing data, rhetorical parsing data and cultural parsing data corresponding to the initial text are obtained through the above-mentioned grammatical parsing agent, rhetorical understanding agent and cultural background agent, these data are still in an independent state, and it is necessary to organically combine these data to make full use of the group intelligence among the grammatical parsing agent, rhetorical understanding agent and cultural background agent to produce the effect of 1+1>2.
[0096] Therefore, refer to Figure 2 , the embodiment of the present application then introduces a task assignment agent to realize the interaction process between the grammatical parsing agent, the rhetorical understanding agent and the cultural background agent, and inputs the initial text, grammatical parsing data, rhetorical parsing data and cultural parsing data into the task assignment agent for task assignment, and obtains the first proportion of grammatical parsing data, the second proportion of rhetorical parsing data and the third proportion of cultural parsing data. There are two purposes for inputting the initial text here, one is to avoid the gradual forgetting of the initial task during the translation process, and the other is to select the degree of participation of grammatical parsing data, rhetorical parsing data and cultural parsing data in the translation result according to the overall meaning of the initial text, and quantify the degree of participation in the form of the first proportion, the second proportion and the third proportion.
[0097] The following are some examples to illustrate this.
[0098] For example, if the initial text is a legal document, the translation process of the legal document requires extremely high accuracy and rigorous grammatical structure to ensure accurate interpretation of the clauses. Therefore, the first proportion of grammatical analysis data corresponds to the highest proportion, for example, 60%. In addition, legal documents usually avoid the use of modifying language and pursue objective and direct expression. Therefore, the second proportion of rhetorical analysis data corresponds to the lowest proportion, for example, 5%. Finally, although legal terms are universal, some legal concepts may be interpreted differently in different jurisdictions, and it is necessary to understand the relevant cultural background. Therefore, the third proportion of cultural analysis data corresponds to a moderate proportion, for example, 35%.
[0099] For example, if the initial text is a literary work, in the process of translating literary works, although grammatical correctness is also important, in order to maintain the style and rhythm of the original work, the grammatical structure can sometimes be adjusted appropriately. Therefore, the first proportion of grammatical analysis data corresponds to a moderate proportion, such as 30%. In addition, the charm of literary works largely comes from their rhetoric techniques, such as metaphors and personification, which need to be carefully processed to retain the artistic effect of the initial text. Therefore, the second proportion of rhetorical analysis data corresponds to a high proportion, such as 30%. Finally, literary works are full of references and metaphors of specific cultures. Understanding and conveying these cultural connotations is crucial to the translation results. Therefore, the third proportion of cultural analysis data corresponds to the highest proportion, such as 40%.
[0100] For example, the initial text is a technical manual or instruction manual. During the translation process of the technical manual or instruction manual, the technical document requires clear and accurate instructions. Grammatical errors may lead to operational errors or misunderstandings. Therefore, the first proportion of grammatical analysis data corresponds to the highest proportion, such as 85%. In addition, technical documents focus on the direct transmission of information and need to avoid unnecessary rhetorical decoration. Therefore, the second proportion of rhetorical analysis data corresponds to the lowest proportion, such as 0%. Finally, even if the general understanding of users in different regions is taken into account, technical terms and operating procedures are usually universal and not greatly affected by cultural differences. Therefore, the third proportion of cultural analysis data corresponds to a moderate proportion, such as 15%.
[0101] From the above, we can see that when assigning tasks, the task assignment agent will intelligently adjust the importance of grammar, rhetoric and cultural background in the translation results according to the different types of initial texts received.
[0102] In one embodiment, since the first ratio, the second ratio and the third ratio directly affect the final translation result, the embodiment of the present application also provides an evaluation measure to further improve the distribution accuracy of these three ratios. Figure 4 , Figure 4 This is a flowchart of adjusting the first ratio, the second ratio and the third ratio provided in an embodiment of the present application, which specifically includes the following steps:
[0103] Step 410: Input the initial text, the first ratio, the second ratio and the third ratio into the interactive evaluation agent for data evaluation to generate evaluation data.
[0104] In one embodiment, an interactive evaluation agent is introduced to evaluate the first ratio, the second ratio, and the third ratio according to the input, and generate evaluation data, which is used to indicate whether these ratios need to be adjusted. It can be understood that the evaluation data can be an evaluation indicator to reflect whether the first ratio, the second ratio, and the third ratio need to be adjusted.
[0105] Step 420: If the evaluation data indicates that at least one of the first ratio, the second ratio and the third ratio needs to be adjusted, the evaluation data is sent to the task assignment agent, and the task assignment agent is used to regenerate the first ratio, the second ratio and the third ratio based on the evaluation data, the initial text, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data until the evaluation data indicates that no adjustment is required.
[0106] In one embodiment, referring to Figure 2 If at least one of the first ratio, the second ratio and the third ratio needs to be adjusted according to the evaluation data, the interactive evaluation agent sends the evaluation data to the task assignment agent. When the task assignment agent receives the evaluation data, it reassigns tasks according to the initial text, grammatical parsing data, rhetorical parsing data and cultural parsing data, regenerates new first ratio, second ratio and third ratio, and sends them to the interactive evaluation agent for evaluation. After multiple evaluations, if the interactive evaluation agent believes that these ratio values are reasonable, it generates evaluation data that does not require adjustment of the first ratio, the second ratio and the third ratio. It is understandable that such adjustment of the ratio may not be perfected in one go, and multiple inquiries and generation are required between the interactive evaluation agent and the task assignment agent.
[0107] Step 140: Generate initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data.
[0108] In one embodiment, after obtaining the first proportion of grammatical parsing data, the second proportion of rhetorical parsing data, and the third proportion of cultural parsing data through the above process, the grammatical parsing data, the rhetorical parsing data, and the cultural parsing data are fused according to the first proportion, the second proportion, and the third proportion to generate initial parsing data.
[0109] In one embodiment, referring to Figure 5 , Figure 5It is a flowchart of generating initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data provided by the embodiment of the present application, which specifically includes the following steps:
[0110] Step 510: Acquire first feature information of grammatical analysis data, acquire second feature information of rhetorical analysis data, and acquire third feature information of cultural analysis data.
[0111] In one embodiment, feature extraction is performed by word embedding or sentence embedding to obtain first feature information of grammatical analysis data, second feature information of rhetorical analysis data, and third feature information of cultural analysis data, and these feature data are all represented as feature vectors.
[0112] Step 520: multiply the first ratio by the first characteristic information, multiply the second ratio by the second characteristic information, and multiply the third ratio by the third characteristic information, and add the multiplication results to obtain initial parsed data.
[0113] In one embodiment, the feature vectors obtained according to the first ratio, the second ratio and the third ratio are weighted and averaged. Specifically, the first ratio is multiplied by the first feature information, the second ratio is multiplied by the second feature information, and the third ratio is multiplied by the third feature information. The multiplication results are added to obtain a weighted average vector, and the vector is converted into text to obtain initial parsed data.
[0114] Step 150: Input the initial text and initial parsed data into a text translation agent for translation processing to obtain a translated text of the initial text.
[0115] In one embodiment, after the initial parsed data is obtained, it and the initial text are translated by inputting a text translation agent. The purpose of inputting the initial text is to allow the text translation agent to not forget the initial starting point of the translation task, thereby improving the accuracy of the translated text.
[0116] In one embodiment, in order to further improve the accuracy of the translated text, the initial text and initial parsed data need to be processed accordingly, specifically: the translation process is optimized and adjusted according to the initial text and initial parsed data to obtain translation reference data, and then the initial text and translation reference data are input into the text translation agent for translation processing to obtain the translated text.
[0117] In one embodiment, referring to Figure 6 , Figure 6 The flowchart of optimizing and adjusting the translation process according to the initial text and the initial parsed data to obtain the translation reference data provided by the embodiment of the present application specifically includes the following steps:
[0118] Step 610: Take the initial text and initial parsed data as input data.
[0119] In one embodiment, referring to Figure 2 , the optimization and adjustment process needs to be carried out based on the initial text and the initial parsed data as input.
[0120] Step 620: Input the input data into the grammar translation agent for grammar translation to obtain grammar translation data.
[0121] Step 630: Input the input data into the semantic translation agent for semantic translation to obtain semantic translation data.
[0122] Step 640: Input the input data into the style translation agent to perform style translation to obtain style translation data.
[0123] In one embodiment, the initial parsed data contains data information related to grammar, rhetoric, cultural background, etc. At this time, the grammar translation agent, semantic translation agent and style translation agent are used in parallel to perform translation from corresponding angles to focus on different aspects of the initial text.
[0124] Among them, grammar translation mainly focuses on the structure of sentences, that is, grammatical rules. This translation method emphasizes maintaining the syntactic structure of the original text and converting the language word by word without considering the context or overall meaning. Therefore, the embodiment of the present application uses a grammar translation agent to perform a grammar-focused translation process on the initial text based on the initial parsed data, and uses the obtained grammar-related translation data as grammar translation data.
[0125] Semantic translation, on the other hand, focuses more on the meaning of the text, that is, the accuracy of the content. In the process of semantic translation, the intention and information of the original text will be expressed as much as possible, not just the literal meaning. It requires a deep understanding of the original text and the ability to find the most appropriate expression in the target language to convey the same meaning. Therefore, the embodiment of the present application uses a semantic translation agent to perform a semantic-focused translation process on the original text based on the initial parsed data, and uses the obtained semantically related translation data as semantic translation data.
[0126] Style translation focuses on the style characteristics of the text, including the author's personality, stylistic characteristics, and the emotional color of the text. This kind of translation should not only convey the content and meaning of the original text, but also reproduce the style and tone of the original text as much as possible. Therefore, the embodiment of the present application uses the style translation agent to perform a style-focused translation process on the initial text based on the initial parsed data, and uses the obtained style-related translation data as the style translation data.
[0127] For example, a sentence in the initial text: "The quick brown fox jumps over the lazy dog" may be translated into "The quick brown fox jumps over the lazy dog" after grammatical translation. The grammatical translation data maintains the syntactic structure of the original text. The semantic translation data obtained through semantic translation focuses more on conveying meaning and may be translated into: "A quick brown fox jumps over a lazy dog". The style translation data obtained after style translation may further consider the style of the initial text based on the rhetoric or cultural background related information in the initial parsed data. For example, if the initial text is a humorous story, it may be translated into: "The quick brown fox jumped over the lazy dog lightly". It can be understood that only one sentence is used as an example here, and the content association of the context in the initial text will also be considered in the translation process of the embodiment of the present application.
[0128] Step 650: Obtain translation reference data according to the grammatical translation data, the semantic translation data and the style translation data.
[0129] In one embodiment, the grammatical translation data is the content after grammatical translation, the semantic translation data is the content after semantic alignment, and the style translation data is the content after style adaptation, so the translation reference data can be obtained by summarizing these three aspects.
[0130] Next, refer to Figure 2 , inputting the initial text and translation reference data into a text translation agent for translation processing to obtain a translated text specifically includes: inputting the initial text and translation reference data into a text translation agent for translation processing to obtain comprehensive translation data, optimizing and adjusting the translation of the comprehensive translation data to obtain a translated text.
[0131] In one embodiment, after obtaining translation reference data related to grammar, semantics and style, the text translation agent uses it as reference information for the translation process of the initial text to obtain comprehensive translation data, and can use multi-party information for verification to improve the overall translation accuracy.
[0132] In one embodiment, after the comprehensive translation data is obtained, it can be output as the final translation text, but the comprehensive translation data can also be further optimized and adjusted to improve the output data quality. Figure 7 , Figure 7 The flowchart of optimizing and adjusting the translation of the comprehensive translation data to obtain the translation text provided by the embodiment of the present application specifically includes the following steps:
[0133] Step 710: Input the comprehensive translation data into the fluency optimization agent to adjust the fluency to obtain fluency optimization data.
[0134] In one embodiment, the comprehensive translation data is input into a fluency optimization agent, which will make fluency adjustments to the text corresponding to the comprehensive translation data, such as adjusting sentence structure, vocabulary selection, and grammar correction, etc., to ensure that the text corresponding to the fluency optimization data after adjustment reads more naturally and conforms to the language habits of the target language.
[0135] Step 720: Input the comprehensive translation data into the style optimization agent to perform style optimization to obtain style translation data.
[0136] In one embodiment, the comprehensive translation data is input into a style optimization agent, which focuses on the text style corresponding to the comprehensive translation data to ensure that the translation process not only conveys the original meaning of the initial text, but also retains the style features of the original text, such as formal, informal, humorous, etc. The style of the text corresponding to the obtained consistency optimization data is consistent with the style of the initial text.
[0137] Step 730: Input the comprehensive translation data into the consistency optimization agent to perform consistency optimization to obtain consistency optimization data.
[0138] In one embodiment, the comprehensive translation data is input into a consistency optimization agent, which ensures that the translation process can maintain consistency in terms of terminology, tense, person, etc., to avoid inconsistencies in the same content in the same text.
[0139] Step 740: Input the fluency optimization data, style translation data and consistency optimization data into the data coordination agent for information integration to obtain the translation text.
[0140] In one embodiment, the fluency optimization data, style translation data, and consistency optimization data obtained in parallel are input into the data coordination agent for information integration to obtain the translation text. Here, the data coordination agent unifies the three optimization data through the information integration process to ensure that the translation text obtained is coordinated as a whole without conflict or duplication.
[0141] In one embodiment, referring to Figure 2 After obtaining the translated text, post-processing operations can be performed, including obtaining the target document format, such as font type, size, color, paragraph arrangement, title level, header and footer, chart layout, etc. Then, the translated text is formatted based on the target document format to obtain a formatted output text consistent with the target document format. Next, the formatted output text can be grammatically checked and / or spelled using natural language processing tools to improve the readability and accuracy of the translation results, and the final translated text can be obtained and output.
[0142] Refer to the following Figure 2, which generally describes the execution process of the text translation method of the embodiment of the present application.
[0143] Figure 2 It can be divided into four stages. The first stage is the preliminary parsing stage. First, the initial text is obtained, and then preprocessing is performed. The initial text is segmented to obtain at least one text segmentation, and the text segmentation is tagged with parts of speech to obtain the part-of-speech data corresponding to each text segmentation. The initial text is syntactically analyzed to obtain syntactic component data, and the translation elements corresponding to the initial text are obtained according to the text segmentation, part-of-speech data and syntactic component data. Next, the translation elements are input into the grammar parsing agent, rhetoric understanding agent and cultural background agent for multi-angle analysis to obtain the corresponding grammar parsing data, rhetoric parsing data and cultural parsing data.
[0144] Then enter the second stage, which is the task allocation stage. Input the initial text, grammatical parsing data, rhetorical parsing data and cultural parsing data into the task allocation agent for task allocation, and obtain the first proportion of grammatical parsing data, the second proportion of rhetorical parsing data and the third proportion of cultural parsing data. Then input the initial text, the first proportion, the second proportion and the third proportion into the interactive evaluation agent for data evaluation, generate evaluation data, if the evaluation data indicates that at least one of the first proportion, the second proportion and the third proportion needs to be adjusted, send the evaluation data to the task allocation agent, and use the task allocation agent to regenerate the first proportion, the second proportion and the third proportion according to the evaluation data, the initial text, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data until the evaluation data indicates that no adjustment is required. Generate initial parsing data based on the last first proportion, the second proportion, the third proportion, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data.
[0145] Next, we enter the third stage, which is the multi-angle translation stage. The initial text and initial parsed data are used as input data, and the input data is input into the grammar translation agent for grammar translation to obtain grammar translation data, the input data is input into the semantic translation agent for semantic translation to obtain semantic translation data, and the input data is input into the style translation agent for style translation to obtain style translation data. Based on the grammar translation data, semantic translation data and style translation data, translation reference data is obtained.
[0146] The last stage is the output optimization stage. First, the initial text and translation reference data are input into the text translation agent for translation processing to obtain comprehensive translation data. Next, the comprehensive translation data is optimized and adjusted to obtain the translation text. Specifically, the comprehensive translation data is input into the fluency optimization agent for fluency adjustment to obtain fluency optimization data, the comprehensive translation data is input into the style optimization agent for style optimization to obtain style translation data, the comprehensive translation data is input into the consistency optimization agent for consistency optimization to obtain consistency optimization data, and the fluency optimization data, style translation data and consistency optimization data are input into the data coordination agent for information integration to obtain the translation text. Finally, the output format and other adjustments can be made to obtain the target document format, such as font type, size, color, paragraph arrangement, title level, header and footer, chart layout, etc. The format of the translated text is then adjusted based on the target document format to obtain a format output text consistent with the target document format. The format output text can also be grammar checked and / or spell checked by natural language processing tools to improve the readability and accuracy of the translation results, and the final translation text is obtained and output.
[0147] It can be seen that multi-level optimization of the translation text through the above process can ensure that the final translation text is not only accurate but also conforms to the usage habits and cultural background of the target language.
[0148] It is understandable that the agent in the embodiment of the present application is implemented based on a large language model. Each agent is trained in advance according to the corresponding sample, has suitable prompt words and model parameters, and can realize the specific functions such as required depth semantic understanding, grammar conversion, and cultural background adaptation. This multi-agent collaborative architecture design utilizes multiple different agents to interact and share information, combines the task allocation process to achieve effective collaboration and mutual division of labor in the translation process, realizes the improvement of group intelligence, can analyze and understand the initial text from multiple perspectives and multiple levels, significantly improves the quality of translation, and ensures that the translation results meet high standards in terms of grammar, semantics, and cultural adaptability. Especially in complex translation tasks, it performs well, for example, in translation tasks such as processing long sentences, complex grammar, and cross-cultural content, in the embodiment of the present application, multi-agents can provide highly natural and fluent translation results by a collaborative approach.
[0149] The technical solution provided by the embodiment of the present application, by obtaining the initial text and the translation elements corresponding to the initial text, the translation elements are respectively input into the grammar parsing agent, the rhetoric understanding agent and the cultural background agent for multi-angle analysis, and the corresponding grammar parsing data, rhetoric parsing data and cultural parsing data are obtained, and the initial text, grammar parsing data, rhetoric parsing data and cultural parsing data are input into the task allocation agent for task allocation, and the first proportion of grammar parsing data, the second proportion of rhetoric parsing data and the third proportion of cultural parsing data are obtained. The initial parsing data is generated according to the first proportion, the second proportion, the third proportion, the grammar parsing data, the rhetoric parsing data and the cultural parsing data, and finally the initial text and the initial parsing data are input into the translation agent for translation processing to obtain the translation text of the initial text. In the embodiment of the present application, different translation angles such as grammar, rhetoric and cultural background are parsed respectively, and then the proportion of parsing results of different translation angles is determined based on the initial text through the task allocation of the agent, so as to obtain the initial parsing data, and the translation result of the initial text is adjusted based on the initial parsing data, and the collective wisdom of multiple agents is combined. Information such as rhetoric and cultural differences is comprehensively utilized in the translation process to achieve a faithful and elegant translation effect.
[0150] The present application also provides a text translation device that can implement the above text translation method. Figure 8 , the device comprises:
[0151] Data acquisition module 810: used to acquire the initial text and the translation elements corresponding to the initial text.
[0152] The multi-angle analysis module 820 is used to input the translation elements into the grammar analysis agent, the rhetoric understanding agent and the cultural background agent for multi-angle analysis, and obtain the corresponding grammar analysis data, rhetoric analysis data and cultural analysis data.
[0153] Task assignment module 830: used to input the initial text, grammatical parsing data, rhetorical parsing data and cultural parsing data into the task assignment agent for task assignment, and obtain a first proportion of grammatical parsing data, a second proportion of rhetorical parsing data and a third proportion of cultural parsing data.
[0154] Initial data generation module 840: used to generate initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data.
[0155] The translation processing module 850 is used to input the initial text and the initial parsed data into the text translation agent for translation processing to obtain the translated text of the initial text.
[0156] The specific implementation of the text translation device of this embodiment is basically the same as the specific implementation of the above-mentioned text translation method, and will not be repeated here.
[0157] The present application also provides an electronic device, including:
[0158] at least one memory;
[0159] at least one processor;
[0160] at least one program;
[0161] The program is stored in the memory, and the processor executes the at least one program to implement the text translation method of the present application. The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a car computer, etc.
[0162] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0163] The processor 901 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0164] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the text translation method of the embodiment of this application;
[0165] Input / output interface 903, used to implement information input and output;
[0166] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); and
[0167] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0168] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0169] An embodiment of the present application further provides a storage medium, which is a storage medium storing a computer program, and the computer program implements the above-mentioned text translation method when executed by a processor.
[0170] As a non-transitory storage medium, the memory can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0171] The text translation method, apparatus, device and storage medium proposed in the embodiments of the present application obtain an initial text and translation elements corresponding to the initial text, respectively input the translation elements into a grammatical parsing agent, a rhetorical understanding agent and a cultural background agent for multi-angle analysis, and obtain corresponding grammatical parsing data, rhetorical parsing data and cultural parsing data, input the initial text, grammatical parsing data, rhetorical parsing data and cultural parsing data into a task allocation agent for task allocation, and obtain a first proportion of the grammatical parsing data, a second proportion of the rhetorical parsing data and a third proportion of the cultural parsing data, generate initial parsing data according to the first proportion, the second proportion, the third proportion, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data, and finally input the initial text and the initial parsing data into a translation agent for translation processing to obtain a translated text of the initial text. In the embodiment of the present application, different translation angles such as grammar, rhetoric and cultural background are analyzed respectively, and then the proportion of analysis results of different translation angles is determined based on the initial text through task allocation of the intelligent agent, so as to obtain initial analysis data, and the translation result of the initial text is adjusted based on the initial analysis data. In combination with the collective wisdom of multiple intelligent agents, information such as rhetoric and cultural differences is comprehensively utilized in the translation process to achieve a faithful, expressive and elegant translation effect.
[0172] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0173] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0174] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0175] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0176] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0177] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0178] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0179] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0180] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0181] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store programs.
[0182] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A text translation method, characterized in that: include: Obtaining an initial text, and obtaining a translation element corresponding to the initial text; Input the translation elements into a grammar analysis agent, a rhetoric understanding agent, and a cultural background agent for multi-angle analysis, and obtain corresponding grammar analysis data, rhetoric analysis data, and cultural analysis data; Inputting the initial text, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data into a task assignment agent for task assignment, thereby obtaining a first proportion of the grammatical parsing data, a second proportion of the rhetorical parsing data and a third proportion of the cultural parsing data; generating initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data, and the cultural parsing data; The initial text and the initial parsed data are input into a text translation agent for translation processing to obtain a translated text of the initial text.
2. The text translation method according to claim 1, characterized in that: Before generating the initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data, the method further includes: Inputting the initial text, the first ratio, the second ratio and the third ratio into an interactive evaluation agent for data evaluation to generate evaluation data; If the evaluation data indicates that at least one of the first ratio, the second ratio and the third ratio needs to be adjusted, the evaluation data is sent to the task assignment agent, and the task assignment agent is used to regenerate the first ratio, the second ratio and the third ratio according to the evaluation data, the initial text, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data until the evaluation data indicates that no adjustment is required.
3. The text translation method according to claim 1, characterized in that: The generating of initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data comprises: Acquire first characteristic information of the grammatical analysis data, acquire second characteristic information of the rhetorical analysis data, and acquire third characteristic information of the cultural analysis data; The first ratio is multiplied by the first characteristic information, the second ratio is multiplied by the second characteristic information, and the third ratio is multiplied by the third characteristic information, and the multiplication results are added to obtain the initial parsed data.
4. The text translation method according to claim 1, characterized in that: The step of inputting the initial text and the initial parsed data into a text translation agent for translation processing to obtain a translated text of the initial text includes: Optimize and adjust the translation process according to the initial text and the initial parsed data to obtain translation reference data; The initial text and the translation reference data are input into the text translation agent for translation processing to obtain the translated text.
5. The text translation method according to claim 4, characterized in that: The optimizing and adjusting the translation process according to the initial text and the initial parsed data to obtain translation reference data includes: Taking the initial text and the initial parsed data as input data; Inputting the input data into a grammar translation agent for grammar translation to obtain grammar translation data; Inputting the input data into a semantic translation agent for semantic translation to obtain semantic translation data; Inputting the input data into a style translation agent for style translation to obtain style translation data; The translation reference data is obtained according to the grammatical translation data, the semantic translation data and the style translation data.
6. The text translation method according to claim 4, characterized in that: The step of inputting the initial text and the translation reference data into the text translation agent for translation processing to obtain the translated text comprises: Inputting the initial text and the translation reference data into the text translation agent for translation processing to obtain comprehensive translation data; The comprehensive translation data is optimized and adjusted to obtain the translation text.
7. The text translation method according to claim 6, characterized in that: The step of optimizing and adjusting the translation of the comprehensive translation data to obtain the translation text includes: Inputting the comprehensive translation data into a fluency optimization agent to adjust the fluency to obtain fluency optimization data; Inputting the comprehensive translation data into a style optimization agent to perform style optimization to obtain style translation data; Inputting the comprehensive translation data into a consistency optimization agent to perform consistency optimization to obtain consistency optimization data; The fluency optimization data, the style translation data and the consistency optimization data are input into a data coordination intelligent agent for information integration to obtain the translation text.
8. The text translation method according to any one of claims 1 to 7, characterized in that: The method further comprises: Acquiring a target document format, and adjusting the format of the translation text based on the target document format to obtain a formatted output text; Performing grammar check and / or spelling check on the format output text to obtain a final translated text.
9. The text translation method according to any one of claims 1 to 7, characterized in that: The obtaining of the translation element corresponding to the initial text includes: Segmenting the initial text to obtain at least one text segmentation; Performing part-of-speech tagging on the text segmentation to obtain part-of-speech data corresponding to each of the text segmentation; Performing syntactic analysis on the initial text to obtain syntactic component data; The translation element is obtained based on the text segmentation, the part-of-speech data and the syntactic component data.
10. A text translation device, characterized in that: include: Data acquisition module: used to acquire the initial text and the translation elements corresponding to the initial text; Multi-angle analysis module: used to input the translation elements into the grammar analysis agent, rhetoric understanding agent and cultural background agent respectively for multi-angle analysis, and obtain corresponding grammar analysis data, rhetoric analysis data and cultural analysis data; Task assignment module: used for inputting the initial text, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data into a task assignment agent for task assignment, and obtaining a first proportion of the grammatical parsing data, a second proportion of the rhetorical parsing data and a third proportion of the cultural parsing data; An initial data generation module: used for generating initial parsing data according to the first ratio, the second ratio, the third ratio, the grammatical parsing data, the rhetorical parsing data and the cultural parsing data; Translation processing module: used for inputting the initial text and the initial parsed data into the text translation agent for translation processing to obtain the translated text of the initial text.
11. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the text translation method according to any one of claims 1 to 9 when executing the computer program.
12. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the text translation method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Machine translation techniques
CA2408819A1
Answering complex questions by neural machine reading understanding dependent on utterance analysis
CN114429133A
Chart machine translation method and system based on rhetorical structure theory
CN116306698A
Soft advertisement implanting method and device based on novel
CN116485466A
Translation method and system based on machine learning model
CN117034967A
Cited By
Multi-agent collaborative cross-language system translation method and system based on loAs
CN121189343A
Ioas-based multi-agent collaborative cross-language system translation method and system
CN121189343B