A multi-language offline intelligent translation system and method
Through the multi-language offline intelligent translation system, offline translation data packets are selected based on text length and semantic relevance, and correction and insertion operations are performed in slow translation mode, and direct translation is performed in fast translation mode, solving the problem of offline translation equipment in the existing technology. The problem of not being able to meet the real-time and accuracy requirements has improved the timeliness and accuracy of translation.
Patent Information
- Application Number
- CN202410788983.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-19
AI Technical Summary
Existing offline translation equipment cannot meet users' needs for real-time translation and accuracy in different states, especially because the pre-trained offline translation data package cannot adapt to various types of sentences, resulting in low translation efficiency.
Using a multi-language offline intelligent translation system, by obtaining the text to be translated and translation timeliness information, different offline translation data packages are selected for translation based on text length and semantic relevance, and a pre-trained correction model is used in slow translation mode for text correction. and spacer insertion to ensure translation accuracy; text translation is performed directly in quick translation mode to improve timeliness.
It is possible to meet users' needs for real-time translation and accuracy in different states, and by selecting appropriate translation data packages and processing methods, the timeliness and accuracy of translation are improved.
Smart Images

Figure CN118364829B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a multi-language offline intelligent translation system and method. Background Art
[0002] Offline translation devices are popular because they are easy to carry and can be used anytime and anywhere without being affected by the network. However, in related technologies, offline translation devices use pre-trained offline translation data packets to accurately translate sentences. Since offline translation data packets cannot adapt to various types of sentences, the translation efficiency is low under certain circumstances, and it cannot meet the user's requirements for real-time translation and translation accuracy under different conditions. Summary of the invention
[0003] The main purpose of the present invention is to provide a multilingual offline intelligent translation system and method, aiming to solve the technical problem that the offline translation equipment in the prior art cannot meet the user's requirements for translation real-time and translation accuracy under different conditions.
[0004] To achieve the above objectives, in a first aspect, an embodiment of the present application provides a multi-language offline intelligent translation method, which is applied to an intelligent offline translation device, and the method includes:
[0005] Obtaining an offline translation instruction, wherein the offline translation instruction carries the first target language text information to be translated and translation time efficiency information, wherein the translation time efficiency information includes fast translation and slow translation;
[0006] When the translation time efficiency information is slow translation, determining the text length and semantic relevance of the first target language text according to the first target language text information;
[0007] Selecting a target offline translation data packet for offline translation according to the text length and semantic relevance of the first target language text, wherein the target offline translation data packet includes a first offline translation data packet and a second offline translation data packet, the first offline translation data packet is used for translating simple text, and the second offline translation data packet is used for translating complex text;
[0008] performing offline translation in response to the second offline translation data packet to obtain an initial translation text;
[0009] The pre-trained offline correction model is used to perform offline correction on the initial translation text to obtain a second target language translation text, wherein the offline correction model is an error correction model trained based on historical manual error correction big data.
[0010] In a possible implementation, after selecting a target offline translation data package for offline translation according to the text length and semantic relevance of the first target language text, the method further includes:
[0011] In response to the first offline translation data packet, performing offline translation to obtain an initial translation text;
[0012] According to a preset recognition rule, feature recognition is performed on the initial translation text to obtain a segmentation boundary, wherein the preset recognition rule is a recognition rule obtained by pre-training and is used to perform feature recognition corresponding to the recognition rule on the initial translation text;
[0013] A separator insertion operation is performed before or after the segmentation boundary to obtain a second target language translation text.
[0014] In a possible implementation, after obtaining the offline translation instruction, the method further includes:
[0015] When the translation time efficiency information is fast translation, a third offline translation data package is selected for offline translation, and the third offline translation data package directly translates the first target language text into a second target language translation text.
[0016] In a possible implementation, determining the text length and semantic relevance of the first target language text according to the first target language text information includes:
[0017] Calling a text length function to perform length identification on the first target language text information to obtain the text length of the first target language text;
[0018] The first target language text information is input into an offline semantic analysis model to obtain the semantic relevance of the first target language text. The offline semantic analysis model is a pre-trained semantic analysis algorithm model used to analyze the text semantic relevance of the first target language text.
[0019] In a possible implementation, selecting a target offline translation data package for offline translation according to the text length and semantic relevance of the first target language text includes:
[0020] Determining that the text length of the first target language text is less than or equal to a first preset length value, selecting the first offline translation data package for offline translation; or determining that the text length of the first target language text is greater than the first preset length value and less than a second preset length value, and the semantic relevance is less than a preset relevance, selecting the first offline translation data package for offline translation;
[0021] Determining that the text length of the first target language text is greater than a second preset length value, selecting the second offline translation data package for offline translation; or determining that the text length of the first target language text is greater than the first preset length value and less than the second preset length value, and the semantic association is greater than or equal to the preset association, selecting the second offline translation data package for offline translation;
[0022] The first preset length value is smaller than the second preset length value.
[0023] In a possible implementation, the offline correction model includes a first error correction model, which corrects errors in first language elements, and the pre-trained offline correction model is used to perform offline correction on the initial translation text to obtain a second target language translation text, including:
[0024] Detecting whether there are errors in the first language elements in the initial translation text;
[0025] If there are first language element errors in the initial translation text, the first error correction model is used to correct the first language element errors in the initial translation text to obtain a second target language translation text.
[0026] In a possible implementation, the offline correction model includes a second error correction model, the second error correction model corrects errors in second language elements, and the pre-trained offline correction model is used to perform offline correction on the initial translation text to obtain a second target language translation text, including:
[0027] Detecting whether there are errors in the second language elements in the initial translation text;
[0028] If there are errors in the second language elements in the initial translation text, the second error correction model is used to correct the errors in the second language elements in the initial translation text to obtain a second target language translation text.
[0029] In a possible implementation, before selecting a target offline translation data package for offline translation according to the text length and semantic relevance of the first target language text, the method further includes:
[0030] Determining a complexity coefficient of the first target language text according to the text length and semantic relevance of the first target language text;
[0031] If the complexity coefficient of the first target language text is greater than or equal to the complexity coefficient threshold, a prompt dialog box is popped up to prompt the user to re-enter the translation sentence;
[0032] If the complexity coefficient of the first target language text is less than the complexity coefficient threshold, a target offline translation data package is selected for offline translation according to the text length and semantic relevance of the first target language text.
[0033] In a possible implementation, determining the complexity coefficient of the first target language text according to the text length and semantic relevance of the first target language text includes:
[0034] The complexity coefficient of the first target language text is determined according to a pre-trained target relationship mapping table, wherein the target relationship mapping table is a relationship mapping table of text length, semantic relevance and text complexity coefficient.
[0035] In a second aspect, the present application also provides a multi-language offline intelligent translation system, including:
[0036] a memory for storing program code; and
[0037] A processor, wherein the processor is used to call the program code to execute the method as described in the first aspect.
[0038] Different from the prior art, the multilingual offline intelligent translation system and method provided by the embodiment of the present application, when the translation time efficiency information is slow translation, the text length and semantic relevance of the first target language text are determined according to the first target language text information; then the target offline translation data packet is selected for offline translation according to the text length and semantic relevance of the first target language text; when the second offline translation data packet is used for offline translation to obtain the initial translation text, the pre-trained offline correction model is used to perform offline correction on the initial translation text to obtain the second target language translation text; when the first offline translation data packet is used for offline translation to obtain the initial translation text, the initial translation text is subjected to a spacer insertion operation to obtain the second target language translation text, thereby improving the accuracy of the translation; when the translation time efficiency information is fast translation, the third offline translation data packet is used to directly translate the first target language text into the second target language translation text, without the need for post-translation interval insertion, error correction and other text processing procedures, while ensuring the accuracy of the translation, the time efficiency of the translation is improved. In this way, the user can select the translation time efficiency according to different translation requirements, thereby meeting the needs of users for translation real-time and translation accuracy under different states. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0040] Figure 1 This is a schematic diagram of the interface of the intelligent offline translation device in some embodiments of the present application;
[0041] Figure 2 A flowchart of a multi-language offline intelligent translation method in some embodiments of the present application;
[0042] Figure 3 This is a specific flow chart of step S200 of the multi-language offline intelligent translation method in some embodiments of the present application;
[0043] Figure 4 This is a schematic diagram of the hardware structure of a multi-language offline intelligent translation system in some embodiments of the present application.
[0044] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0047] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, "and / or" in the full text includes three solutions. Taking A and / or B as an example, it includes technical solution A, technical solution B, and technical solution that satisfies both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0048] Offline translation devices are popular because they are easy to carry and can be used anytime and anywhere without being affected by the network. However, in related technologies, offline translation devices use pre-trained offline translation data packets to accurately translate sentences. Since offline translation data packets cannot adapt to various types of sentences, the translation efficiency is low under certain circumstances, and it cannot meet the user's requirements for real-time translation and translation accuracy under different conditions.
[0049] In view of the above problems, the present application proposes a multi-language offline intelligent translation method, which is applied to an intelligent offline translation device. The intelligent offline translation device of the present application has three translation data packets: (1) a first translation data packet, which is used for translating simple texts such as short sentences or phrases. The translation data packet has a separator insertion algorithm and can insert separators; (2) a second translation data packet, which is used for translating complex texts such as long sentences. The translation data packet has an error correction algorithm and can correct translation errors; (3) a third translation data packet, which is used for translating simple texts such as short sentences or phrases. The translation data packet does not have any subsequent processing algorithm.
[0050] It can be understood that since the first translation data packet and the second translation data packet need to undergo corresponding text processing after translation, the resulting translated texts are more accurate but less timely, and the corresponding translation timeliness information is slow translation; while the third translation data packet does not undergo any text processing after translation, and has better translation timeliness, and the corresponding translation timeliness information is fast translation.
[0051] It should be noted that if Figure 1As shown, the intelligent offline translation device of the present application includes a gear switch for translation speed. When the gear switch is turned to the "fast" position, the translation time information is represented as fast translation. The gear switch of the intelligent offline translation device is turned to "slow", and its display interface includes an input display area 200, a translation display area 300 and a virtual keyboard area 400. The virtual keyboard area 400 is used to input text to be translated, the input display area 200 is used to display the text to be translated, and the translation display area 300 is used to display the translated text obtained after translation.
[0052] like Figure 1-3 As shown, the following will mainly describe the specific steps of the multi-language offline intelligent translation method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order from here. Figure 2 , the method comprises the following steps:
[0053] S100, obtaining an offline translation instruction, wherein the offline translation instruction carries first target language text information to be translated and translation time efficiency information, wherein the translation time efficiency information includes fast translation and slow translation;
[0054] like Figure 1 As shown, when the gear switch of the intelligent offline translation device is turned to the "fast" gear, the translation time information is represented as fast translation. When the gear switch of the intelligent offline translation device is turned to the "slow" gear, the translation time information is represented as slow translation.
[0055] When the user inputs the first target language text to be translated on the intelligent offline translation device and clicks "Translate", the processor of the intelligent offline translation device automatically obtains the offline translation instruction. At this time, the offline translation instruction carries the first target language text information to be translated and the translation time information, so that the corresponding time and the corresponding text are translated according to the relevant information.
[0056] S200, when the translation time efficiency information is slow translation, determining the text length and semantic relevance of the first target language text according to the first target language text information;
[0057] When the user switches the gear switch of the intelligent offline translation device to the "slow" gear, it means that the user prioritizes the accuracy of the translation and does not care about the speed of the translation. The translation timeliness information is slow translation. At this time, it is necessary to determine the text length and semantic relevance of the first target language text based on the first target language text information, so as to select a suitable translation data package for translation based on the text length and semantic relevance of the first target language text.
[0058] In one embodiment, the step S200: determining the text length and semantic relevance of the first target language text according to the first target language text information includes:
[0059] S210, calling a text length function to perform length identification on the first target language text information to obtain the text length of the first target language text;
[0060] S220: Input the first target language text information into an offline semantic analysis model to obtain the semantic relevance of the first target language text.
[0061] Specifically, a text length function can be called to identify the text length of the first target language text information to obtain the text length of the first target language text, and a semantic correlation analysis can be performed through a semantic analysis model to obtain the semantic correlation of the first target language text. For example, a pre-trained deep learning model can be used to perform semantic correlation feature identification to perform correlation estimation to obtain the text semantic correlation of the first target language text. The deep learning model can be obtained by configuring parameters after testing a large amount of data.
[0062] S300, selecting a target offline translation data packet for offline translation according to the text length and semantic relevance of the first target language text, wherein the target offline translation data packet includes a first offline translation data packet and a second offline translation data packet;
[0063] Since the processor of the intelligent offline translation device has a processing "comfort level" range for the complexity of the text, it can also be understood that when the complexity of the text is within a certain range, the processor can cope with it for translation. When the complexity of the text exceeds a certain range, the processor cannot translate it, and the user is required to manually split the text to be translated to simplify the text to be translated.
[0064] Therefore, in one embodiment, before step S300: selecting a target offline translation data package for offline translation according to the text length and semantic relevance of the first target language text, the method further includes:
[0065] Determining a complexity coefficient of the first target language text according to the text length and semantic relevance of the first target language text;
[0066] If the complexity coefficient of the first target language text is greater than or equal to the complexity coefficient threshold, a prompt dialog box is popped up to prompt the user to re-enter the translation sentence;
[0067] If the complexity coefficient of the first target language text is less than the complexity coefficient threshold, a target offline translation data package is selected for offline translation according to the text length and semantic relevance of the first target language text.
[0068] Specifically, first, the complexity coefficient of the first target language text is obtained according to the text length and semantic relevance of the first target language text. After the complexity coefficient of the first target language text is obtained, when it is determined that the complexity coefficient of the first target language text is greater than or equal to the complexity coefficient threshold, it means that the first target language text is too complex and exceeds the translation processing range of the processor. At this time, a prompt dialog box pops up to prompt the user to re-enter the translation sentence (re-enter after simplification); when it is determined that the complexity coefficient of the first target language text is less than the complexity coefficient threshold, it means that the processor is able to process the text to be translated. At this time, it is necessary to select a target offline translation data package for offline translation according to the text length and semantic relevance of the first target language text.
[0069] It should be noted that when determining the complexity coefficient of the first target language text, the complexity coefficient of the first target language text can be determined according to a pre-trained target relationship mapping table, wherein the target relationship mapping table is a relationship mapping table of text length, semantic relevance and text complexity coefficient.
[0070] When the translation time efficiency information indicates a slow translation and the processor is capable of processing it, the translation time efficiency and translation accuracy can be further divided according to the text length and semantic relevance. For example, when the first translation data packet is selected, since only simple text processing is required after the translated text is obtained, the time spent is relatively less. Therefore, when the first translation data packet is selected for translation, the time efficiency is better than when the second translation data packet is selected for translation. When the second translation data packet is selected, since text processing such as error detection and correction is required after the translated text is obtained, when the second translation data packet is selected for translation, the accuracy is better than when the first translation data packet is selected for translation.
[0071] In one embodiment, the step S300: selecting a target offline translation data package for offline translation according to the text length and semantic relevance of the first target language text includes:
[0072] S310: Determine that the text length of the first target language text is less than or equal to a first preset length value, or that the text length of the first target language text is greater than the first preset length value and less than a second preset length value, and the semantic relevance is less than or equal to a preset relevance, and select the first offline translation data package for offline translation;
[0073] S320: Determine that the text length of the first target language text is greater than a second preset length value, or that the text length of the first target language text is greater than the first preset length value and less than the second preset length value, and the semantic association is greater than or equal to the preset association degree, and select the second offline translation data package for offline translation, wherein the first preset length value is less than the second preset length value.
[0074] Specifically, when the text length of the first target language text is less than or equal to the first preset length value, or when the text length of the first target language text is greater than the first preset length value and less than the second preset length value, but the semantic association is less than the preset association degree, it means that the complexity of the first target language text is relatively low, and the probability of translation error is also relatively small. At this time, the first offline translation data packet is used for offline translation. After the offline translation is performed using the first offline translation data packet to obtain the initial translation text, the initial translation text can be feature recognized according to the preset recognition rule to obtain the segmentation boundary, and then a separator insertion operation is performed before or after the segmentation boundary to obtain the second target language translation text. For example, according to the "name" recognition rule, that is, different names are recognized, and a separator insertion operation is performed between the names to accurately obtain the translation text; thereby improving the accuracy of text translation, facilitating user reference, and reducing recognition errors in user reference.
[0075] When the text length of the first target language text is greater than the second preset length value, or when the text length of the first target language text is greater than the first preset length value and less than the second preset length value, and the semantic association is greater than or equal to the preset association degree, it indicates that the complexity of the first target language text is relatively high, and the probability of translation errors is also relatively high. At this time, the second offline translation data packet is used for offline translation. After the second offline translation data packet is used for offline translation to obtain the initial translation text, the translation text can be further processed to further improve the accuracy of the text translation, for example, errors in the initial translation text can be automatically corrected to further improve the accuracy of the translation.
[0076] S400, performing offline translation in response to the second offline translation data packet to obtain an initial translation text;
[0077] After the system detects that the first translated text is obtained by performing offline translation using the second offline translation data packet, the first translated text needs to be further processed to improve the accuracy of the translation.
[0078] S500: Using a pre-trained offline correction model to perform offline correction on the initial translation text to obtain a second target language translation text, wherein the offline correction model is an error correction model trained based on historical manual error correction big data.
[0079] In one embodiment, the offline correction model includes a first error correction model, and the first error correction model corrects errors in first language elements. The step S500: using a pre-trained offline correction model to perform offline correction on the initial translation text to obtain a second target language translation text includes:
[0080] S510, detecting whether the initial translation text has errors in first language elements;
[0081] S520: If there are first language element errors in the initial translation text, use the first error correction model to correct the first language element errors in the initial translation text to obtain a second target language translation text.
[0082] Specifically, the first error correction model is an error correction model trained based on historical manual error correction big data. Exemplarily, the first language element error correction model is an "adverbial position correction" model. For example, in English-Chinese translation, there are often grammatical errors in the adverbial position. After manual feedback and correction, data training is performed to obtain the first error correction model. If the processor receives the translation text "we don't need to go to school today If the storm is coming", it translates it to obtain the translation text "We don't need to go to school today If the storm is coming", and the detection finds that "We don't need to go to school today If the storm is coming" does not conform to Chinese grammar and there is an inaccurate translation. At this time, the first language element error correction model is obtained through training with user historical feedback data to correct it to obtain "If the storm is coming, we don't need to go to school today", thereby obtaining an accurate second target language translation text, which is convenient for users to understand the translation text.
[0083] In other embodiments, artificial intelligence machine training can be performed based on user historical feedback data to obtain a second error correction model. For example, the second error correction model is a "subject position correction" model. Similarly, when it is detected that the subject position of the initial translation text is wrong, the subject position can be corrected through the second error correction model to obtain an accurate second target language translation text, further facilitating the user's understanding of the translated text.
[0084] In another embodiment, after obtaining the offline translation instruction, the method further includes:
[0085] S600: When the translation time efficiency information is fast translation, select a third offline translation data package to perform offline translation, wherein the third offline translation data package directly translates the first target language text into a second target language translation text.
[0086] Specifically, when the user turns the gear switch of the intelligent offline translation device to the "fast" gear, it means that the user gives priority to the timeliness of the translation, and the translation timeliness information is fast translation. At this time, the third offline translation data packet is selected for offline translation, and the third offline translation data packet directly translates the first target language text into the second target language translation text. There is no need to perform post-translation interval insertion, error correction and other text processing procedures, which greatly improves the timeliness of the translation.
[0087] Based on this, the multilingual offline intelligent translation method of the present application, when the translation time efficiency information is slow translation, first determine the text length and semantic relevance of the first target language text according to the first target language text information; then select the target offline translation data packet for offline translation according to the text length and semantic relevance of the first target language text; when the first offline translation data packet is used for offline translation to obtain the initial translation text, the initial translation text is inserted into the spacer to obtain the second target language translation text, thereby improving the accuracy of the translation; when the second offline translation data packet is used for offline translation to obtain the initial translation text, the pre-trained offline correction model is used to correct the initial translation text offline to obtain the second target language translation text, thereby further improving the accuracy of the translation; when the translation time efficiency information is fast translation, the third offline translation data packet is used to directly translate the first target language text into the second target language translation text, without the need for post-translation interval insertion, error correction and other text processing procedures, while ensuring the accuracy of the translation, the time efficiency of the translation is improved. In this way, users can choose the translation time efficiency according to different translation needs, thereby meeting the needs of users for translation real-time and translation accuracy under different conditions.
[0088] The present application also provides a multi-language offline intelligent translation system. Figure 4 , Figure 4 A schematic diagram of the hardware structure of a multi-language offline intelligent translation system provided in some embodiments of the present application, wherein the multi-language offline intelligent translation system includes a memory 110 and a processor 120, wherein the memory 110 is used to store program codes, and the processor 120 is used to call the program codes to execute the method described above.
[0089] The processor 120 is used to provide computing and control capabilities to control the multi-language offline intelligent translation system to perform corresponding tasks, for example, to control the multi-language offline intelligent translation system to perform the multi-language offline intelligent translation method in any of the above method embodiments, the method comprising: obtaining an offline translation instruction, wherein the offline translation instruction carries the first target language text information to be translated and the translation time information, the translation time information including fast translation and slow translation; when the translation time information is slow translation, determining the text length and semantic relevance of the first target language text according to the first target language text information; selecting a target offline translation data packet for offline translation according to the text length and semantic relevance of the first target language text, wherein the target offline translation data packet includes a first offline translation data packet and a second offline translation data packet; performing offline translation in response to the second offline translation data packet to obtain an initial translation text; and using a pre-trained offline correction model to perform offline correction on the initial translation text to obtain a second target language translation text, wherein the offline correction model is an error correction model trained based on historical manual error correction big data.
[0090] The processor 120 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0091] The memory 110, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the multi-language offline intelligent translation method in the embodiments of the present application. The processor 120 can implement the multi-language offline intelligent translation method in any of the above method embodiments by running the non-transitory software programs, instructions and modules stored in the memory 110.
[0092] Specifically, the memory 110 may include a volatile memory (VM), such as a random access memory (RAM); the memory 110 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD) or other non-transitory solid-state storage device; the memory 110 may also include a combination of the above types of memory.
[0093] In summary, the multilingual offline intelligent translation system of the present application adopts the technical solution of any one of the above-mentioned multilingual offline intelligent translation method embodiments, and therefore, has at least the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be described one by one here.
[0094] The embodiment of the present application also provides a computer-readable storage medium, such as a memory including a program code, and the program code can be executed by a processor to complete the multi-language offline intelligent translation method in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CDROM), a magnetic tape, a floppy disk, and an optical data storage device.
[0095] The present application also provides a computer program product, which includes one or more program codes stored in a computer-readable storage medium. The processor of the multi-language offline intelligent translation system reads the program code from the computer-readable storage medium, and the processor executes the program code to complete the steps of the multi-language offline intelligent translation method provided in the above embodiment.
[0096] A person skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be accomplished by hardware or by hardware associated with a program code, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0097] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be 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.
[0098] Through the description of the above embodiments, it can be clearly understood by those skilled in the art that each embodiment can be implemented by means of software plus a general hardware platform, or by hardware. It can be understood by those skilled in the art that all or part of the processes in the above embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0099] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A multi-language offline intelligent translation method, applied to an intelligent offline translation device, It is characterized in that The method comprises: Obtaining an offline translation instruction, wherein the offline translation instruction carries the first target language text information to be translated and translation time efficiency information, wherein the translation time efficiency information includes fast translation and slow translation; When the translation time efficiency information is slow translation, determining the text length and semantic relevance of the first target language text according to the first target language text information; Selecting a target offline translation data packet for offline translation according to the text length and semantic relevance of the first target language text, wherein the target offline translation data packet includes a first offline translation data packet and a second offline translation data packet, the first offline translation data packet is used for translating simple text, and the second offline translation data packet is used for translating complex text; performing offline translation in response to the second offline translation data packet to obtain an initial translation text; The pre-trained offline correction model is used to perform offline correction on the initial translation text to obtain a second target language translation text, wherein the offline correction model is an error correction model trained based on historical manual error correction big data.
2. The multilingual offline intelligent translation method according to claim 1, It is characterized in that After selecting a target offline translation data package for offline translation according to the text length and semantic relevance of the first target language text, the method further includes: performing offline translation in response to the first offline translation data packet to obtain an initial translation text; According to a preset recognition rule, feature recognition is performed on the initial translation text to obtain a segmentation boundary, wherein the preset recognition rule is a recognition rule obtained by pre-training and is used to perform feature recognition corresponding to the recognition rule on the initial translation text; A separator insertion operation is performed before or after the segmentation boundary to obtain a second target language translation text.
3. The multilingual offline intelligent translation method according to claim 1, It is characterized in that After obtaining the offline translation instruction, the method further includes: When the translation time efficiency information is fast translation, a third offline translation data package is selected for offline translation, and the third offline translation data package directly translates the first target language text into a second target language translation text.
4. The multilingual offline intelligent translation method according to claim 1, It is characterized in that The determining the text length and semantic relevance of the first target language text according to the first target language text information includes: Calling a text length function to perform length identification on the first target language text information to obtain the text length of the first target language text; The first target language text information is input into an offline semantic analysis model to obtain the semantic relevance of the first target language text. The offline semantic analysis model is a pre-trained semantic analysis algorithm model used to analyze the text semantic relevance of the first target language text.
5. The multilingual offline intelligent translation method according to claim 1, It is characterized in that The step of selecting a target offline translation data packet for offline translation according to the text length and semantic relevance of the first target language text includes: Determining that the text length of the first target language text is less than or equal to a first preset length value, selecting the first offline translation data package for offline translation; or determining that the text length of the first target language text is greater than the first preset length value and less than a second preset length value, and the semantic relevance is less than a preset relevance, selecting the first offline translation data package for offline translation; Determining that the text length of the first target language text is greater than a second preset length value, selecting the second offline translation data package for offline translation; or determining that the text length of the first target language text is greater than the first preset length value and less than the second preset length value, and the semantic association is greater than or equal to the preset association, selecting the second offline translation data package for offline translation; The first preset length value is smaller than the second preset length value.
6. The multilingual offline intelligent translation method according to claim 1, It is characterized in that The offline correction model includes a first error correction model, which corrects errors in first language elements. The pre-trained offline correction model is used to perform offline correction on the initial translation text to obtain a second target language translation text, including: Detecting whether there are errors in the first language elements in the initial translation text; If there are first language element errors in the initial translation text, the first error correction model is used to correct the first language element errors in the initial translation text to obtain a second target language translation text.
7. The multilingual offline intelligent translation method according to claim 1, It is characterized in that The offline correction model includes a second error correction model, and the second error correction model corrects errors in second language elements. The pre-trained offline correction model is used to perform offline correction on the initial translation text to obtain a second target language translation text, including: Detecting whether there are errors in the second language elements in the initial translation text; If there are second language element errors in the initial translation text, the second error correction model is used to correct the second language element errors in the initial translation text to obtain a second target language translation text.
8. The multilingual offline intelligent translation method according to claim 1, It is characterized in that Before selecting a target offline translation data package for offline translation according to the text length and semantic relevance of the first target language text, the method further includes: Determining a complexity coefficient of the first target language text according to the text length and semantic relevance of the first target language text; If the complexity coefficient of the first target language text is greater than or equal to the complexity coefficient threshold, a prompt dialog box is popped up to prompt the user to re-enter the translation sentence; If the complexity coefficient of the first target language text is less than the complexity coefficient threshold, a target offline translation data package is selected for offline translation according to the text length and semantic relevance of the first target language text.
9. The multilingual offline intelligent translation method according to claim 8, It is characterized in that The determining the complexity coefficient of the first target language text according to the text length and semantic relevance of the first target language text includes: The complexity coefficient of the first target language text is determined according to a pre-trained target relationship mapping table, wherein the target relationship mapping table is a relationship mapping table of text length, semantic relevance and text complexity coefficient.
10. A multi-language offline intelligent translation system, It is characterized in that include: A memory, the memory being used to store program codes; as well as, A processor, wherein the processor is used to call the program code to execute the method according to any one of claims 1 to 9.
Citation Information
Cited By
Intelligent offline Chinese medicine classical book translation method and system
CN121392871A
