CN116187353A - Translation method, translation device, computer equipment and storage medium thereof - Google Patents

Translation method, translation device, computer equipment and storage medium thereof Download PDF

Info

Publication number
CN116187353A
CN116187353A CN202310168655.9A CN202310168655A CN116187353A CN 116187353 A CN116187353 A CN 116187353A CN 202310168655 A CN202310168655 A CN 202310168655A CN 116187353 A CN116187353 A CN 116187353A
Authority
CN
China
Prior art keywords
translation
target
language
task
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310168655.9A
Other languages
Chinese (zh)
Inventor
冯歆然
刘华杰
王雅欣
张宏韬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310168655.9A priority Critical patent/CN116187353A/en
Publication of CN116187353A publication Critical patent/CN116187353A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/253Grammatical analysis; Style critique
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Machine Translation (AREA)

Abstract

The application relates to a translation method, a translation device, computer equipment and a storage medium thereof. Relates to the technical field of artificial intelligence, and the method comprises the following steps: acquiring content to be translated; inputting the content to be translated into a target language model to obtain a translation result which is generated by the target language model and corresponds to the content to be translated, wherein the target language model is obtained by training a grammar training sample and a language training sample which are determined based on a target translation task. The method and the device enable the target translation model to smoothly complete the target translation task, and ensure the translation accuracy of the target translation task.

Description

Translation method, translation device, computer equipment and storage medium thereof
Technical Field
The present disclosure relates to the field of artificial intelligence technologies, and in particular, to a translation method, apparatus, computer device, and storage medium thereof.
Background
With the continuous development of society, people often encounter the situation that language translation is required in daily life and work; therefore, to meet the needs of people for language translation, a translation model based on an "intermediate language" mode has been developed.
The translation model based on the 'intermediate language' mode is specifically used for selecting another language as an intermediate language in the process of translating the language to be translated into the target language, so that the language to be translated is translated into the intermediate language, and the intermediate language is translated into the target language. For example, when it is desired to translate chinese into french, english may be selected as the intermediate language, so that when translating chinese, chinese may be translated into english and then english into french.
However, since the translation model in the "intermediate language" mode requires the introduction of a third language (i.e., intermediate language) to translate the language to be translated into the target language, an error between the language to be translated and the target language increases, and thus the translation result obtained by performing language translation in the translation model mainly in the "intermediate language" mode is poor in accuracy.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a translation method, a translation device, a computer apparatus, and a storage medium thereof, which can improve the translation accuracy.
In a first aspect, the present application provides a translation method. The method comprises the following steps:
acquiring content to be translated;
inputting the content to be translated into a target language model to obtain a translation result which is generated by the target language model and corresponds to the content to be translated, wherein the target language model is obtained by training a grammar training sample and a language training sample which are determined based on a target translation task.
In one embodiment, inputting the content to be translated into a target language model, performing vector conversion on the content to be translated, and determining a vector to be translated of the content to be translated;
and obtaining a translation result corresponding to the content to be translated, which is generated by the target language model, based on the vector to be translated.
In one embodiment, a grammar training sample and a language training sample are determined according to a target translation task; wherein the target translation task comprises: original language, target language and translation accuracy;
carrying out grammar training on the translation model to be trained based on the grammar training sample to obtain a basic translation model;
determining a target neural network affecting translation accuracy in a basic translation model;
and performing fine tuning training on the target neural network in the basic translation model based on the language training sample to obtain a target translation model, wherein the target language model is used for executing the translation task from the original language to the target language.
In one embodiment, determining a grammar training sample based on a target translation task includes:
determining a grammar training task according to the translation precision in the target translation task;
and determining a grammar training sample according to the original language, the target language and the grammar training task in the target translation task.
In one embodiment, determining the language training samples based on the target translation task includes:
and determining a language training sample according to the original language and the target language in the target translation task.
In one embodiment, the grammar training tasks include at least one of a complete gap-filling task, a sentence-in-sentence prediction task, and a multi-language collation task.
In one embodiment, determining a target neural network in a base translation model that affects translation accuracy includes:
determining whether the target translation task has a corresponding historical translation task; the historical translation task is the same as the original language and the target language in the target translation task;
if yes, determining a target neural network affecting language translation accuracy in the basic translation model according to the network fine adjustment record corresponding to the historical translation task.
In one embodiment, the method further comprises:
if not, determining the influence degree of each candidate neural network in the basic language model on the translation accuracy of the target translation task;
and determining a target neural network from the candidate neural networks based on the influence degree determination result.
In a second aspect, the present application also provides a translation device. The device comprises:
the acquisition module is used for acquiring the content to be translated;
the input module is used for inputting the content to be translated into the target language model to obtain a translation result which is generated by the target language model and corresponds to the content to be translated, wherein the target language model is obtained by training a grammar training sample and a language training sample which are determined based on a target translation task.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the translation method according to any of the embodiments of the first aspect described above when the processor executes the computer program.
In a fourth aspect, the present application also provides a computer-readable storage medium. A computer readable storage medium having stored thereon a computer program which when executed by a processor implements a translation method as in any of the embodiments of the first aspect described above.
In a fifth aspect, the present application also provides a computer program product. A computer program product comprising a computer program which, when executed by a processor, implements a translation method as in any of the embodiments of the first aspect described above.
According to the technical scheme, through determining the grammar training sample and the language training sample, the smooth proceeding of the subsequent procedure is ensured, the training sample is provided for the subsequent training, the training effect is ensured, the grammar training can be carried out on the translation model to be trained according to the grammar training sample, the translation accuracy of the subsequent target translation task is improved, the fine tuning training can be carried out on the basic translation model according to the language training sample, and the translation accuracy of the subsequent target translation task is further improved; through determining the target neural network influencing the translation accuracy, the follow-up fine-tuning training of the basic translation model can be successfully performed, only the target neural network is guaranteed to be trained when the basic translation model is subjected to the fine-tuning training, the training efficiency of the fine-tuning training is improved, the training effect of the fine-tuning training is guaranteed, the target translation task can be successfully completed by the target translation model, and the accuracy of the target translation model for executing the target translation task is guaranteed.
Drawings
FIG. 1 is an application environment diagram of a translation method according to an embodiment of the present application;
FIG. 2 is a flowchart of a translation method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for determining a vector to be translated according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of a translation method according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating steps for determining a grammar training sample according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating steps for determining a target neural network according to an embodiment of the present disclosure;
FIG. 7 is a flowchart of another translation method according to an embodiment of the present application;
FIG. 8 is a block diagram illustrating a first translation device according to an embodiment of the present disclosure;
FIG. 9 is a block diagram of a second translation device according to an embodiment of the present disclosure;
FIG. 10 is a block diagram illustrating a third translation device according to an embodiment of the present disclosure;
FIG. 11 is a block diagram illustrating a fourth translation device according to an embodiment of the present disclosure;
fig. 12 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application. In the description of the present application, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
With the continuous development of society, people often encounter the situation that language translation is required in daily life and work; therefore, to meet the needs of people for language translation, a translation model based on an "intermediate language" mode has been developed.
The translation model based on the 'intermediate language' mode is specifically used for selecting another language as an intermediate language in the process of translating the language to be translated into the target language, so that the language to be translated is translated into the intermediate language, and the intermediate language is translated into the target language. For example, when it is desired to translate chinese into french, english may be selected as the intermediate language, so that when translating chinese, chinese may be translated into english and then english into french.
However, since the translation model in the "intermediate language" mode requires the introduction of a third language (i.e., intermediate language) to translate the language to be translated into the target language, an error between the language to be translated and the target language increases, and thus the translation result obtained by performing language translation in the translation model mainly in the "intermediate language" mode is poor in accuracy.
The translation method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in FIG. 1. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing the acquired data of the translation method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a translation method.
The application discloses a translation method, a translation device, computer equipment and a storage medium thereof. The computer equipment of the staff determines grammar training samples and language training samples according to the target translation task; according to the grammar training sample, a basic translation model is obtained; determining a target neural network of a basic translation model; and performing fine tuning training on the target neural network of the basic translation model based on the language training sample to obtain the target translation model.
In one embodiment, as shown in fig. 2, fig. 2 is a flowchart of a translation method provided in an embodiment of the present application, where a translation method performed by a computer device in fig. 1 may include the following steps:
in step 201, the content to be translated is obtained.
It should be noted that, the content to be translated refers to related content that needs the target language model to translate, and the content to be translated may include, but is not limited to: articles, phrases, words, etc.
Further, the content to be translated may be composed of multiple languages.
Step 202, inputting the content to be translated into a target language model to obtain a translation result corresponding to the content to be translated, which is generated by the target language model.
The target language model is obtained by training grammar training samples and language training samples which are determined based on target translation tasks.
According to the translation method, the translation operation of the content to be translated is achieved by inputting the content to be translated into the target language model, so that the target translation model can smoothly complete translation work.
It should be noted that, vector conversion is performed on the content to be translated, and the vector to be translated is determined; optionally, as shown in fig. 3, fig. 3 is a flowchart of a step of determining a vector to be translated according to an embodiment of the present application. Specifically, determining the vector to be translated may include the steps of:
step 301, inputting the content to be translated into the target language model, performing vector conversion on the content to be translated, and determining a vector to be translated of the content to be translated.
It should be noted that, when the content to be translated needs to be vector-converted, the content to be translated may be vector-converted based on a preset character-vector comparison table.
In one embodiment of the present application, when the content to be translated needs to be vector-converted, each character in the content to be translated is represented by a specific vector according to a character-vector comparison table, so as to obtain a vector to be translated corresponding to the content to be translated.
Step 302, based on the vector to be translated, a translation result corresponding to the content to be translated, which is generated by the target language model, is obtained.
Specifically, when a translation result corresponding to the content to be translated needs to be determined, the vector to be translated can be input into the target language model, so that a translation result corresponding to the content to be translated, which is generated by the target language model, is obtained.
According to the translation method, the translation result corresponding to the content to be translated, which can be smoothly generated by the subsequent target language model, is ensured by carrying out vector conversion on the content to be translated, and the accuracy of the translation result is ensured.
It should be noted that, the target language model may be obtained by training based on the grammar training sample and the language training sample determined by the target translation task, as shown in fig. 4, and fig. 4 is a flowchart of a step of training the target language model according to an embodiment of the present application.
Specifically, training the target language model may include the steps of:
step 401, determining a grammar training sample and a language training sample according to a target translation task; wherein the target translation task comprises: original language, target language and translation accuracy.
It should be noted that, the primitive language refers to the language to be translated in the target translation task, the target language refers to the language to be translated in the original language in the target translation task, and the translation accuracy refers to the degree to which the primitive language is translated to the target language to allow the wrong translation word to appear.
For example, the target translation task may be: translating English into Arabic, and requiring translation accuracy to be no more than one word with each thousand word errors; the English is the primitive type of the target translation task, the Arabic is the target language of the target translation task, and the word with each thousand word errors is not more than one, which is the translation precision of the target translation task.
It should be noted that, the grammar training sample may be used for performing grammar training on the translation model to be trained, so as to ensure that the translation model to be trained can have grammar knowledge of the target language and improve accuracy of translating the target language.
The training task for training the grammar knowledge of the target language refers to: the training task of training the grammar knowledge of the target language can be realized, and the model can be understood to have the grammar knowledge of the target language through the training task of training the grammar knowledge of the target language.
In an embodiment of the present application, when a grammar training sample needs to be determined, a target language of the target translation task may be determined according to the target translation task, and a training task for training grammar knowledge of the target language may be determined.
Further, the grammar training samples may include grammar training samples for translating a plurality of languages into a target language, and grammar training samples for translating a single language into a target language; specifically, when the primitive types of the target translation task are determined to be multiple languages according to the target translation task, determining a grammar training sample for translating the multiple languages into the target language is required; when the primitive types of the target translation task are determined to be single languages according to the target translation task, a grammar training sample for translating the single languages into the target language needs to be determined.
Further, the language training sample can perform fine tuning training on the model aiming at the target language so as to ensure that the trained model can translate the primitive language into the target language more accurately, and further improve the accuracy of translating the target language.
For example, when the original language is Chinese and the target language is English, the language training sample is: the Chinese 'Good morning' is converted into English 'Good playing'; when the original language is Chinese and the target language is German, the language training sample is: the Chinese "good morning" is converted to the German "Guten morgen".
And step 402, carrying out grammar training on the translation model to be trained based on the grammar training sample to obtain a basic translation model.
It should be noted that, in order to ensure that the primitive types in the target translation task can be translated into the target languages accurately, the translation model to be trained needs to be subjected to grammar training, so as to ensure that the trained basic translation model has grammar knowledge of the target languages, and improve the accuracy of translating the primitive types into the target languages.
For example, the grammar training samples may be: chinese: [ MASK ] morning, english: [ MASK ] driving, german: [ MASK ] morgen and spanish: and the word behind the MASK is specific to the content that the translation model to be trained needs to learn, and when the translation model to be trained is grammatically trained according to the grammar training sample, the translation model to be trained predicts the word behind the MASK according to the context at the position of the MASK in the original text, and further, whether the single output of the translation model to be trained is correct or not is judged.
Further, the strength of grammar training of the translation model to be trained can be determined according to the translation precision in the target translation task; for example, when it is determined that the translation accuracy in the target translation task is higher, more grammar training samples need to be determined, so that the translation model to be trained is subjected to grammar training according to the more grammar training samples; when the translation precision in the target translation task is determined to be lower, fewer grammar training samples can be determined, so that the translation model to be trained is subjected to grammar training according to the fewer grammar training samples.
Step 403, determining a target neural network affecting translation accuracy in the basic translation model.
It should be noted that, because the basic translation model has completed grammar training, the neural network related to grammar in the basic translation model does not need to perform subsequent training work, and if the neural network related to grammar in the basic translation model is trained for all the neural networks of the basic translation model, the accuracy of translation of the basic translation model is not affected, and resource waste is also caused, and the training efficiency of the basic translation model is affected. Therefore, in order to prevent resource waste and improve the training efficiency of the basic translation model, the target neural network influencing the translation accuracy in the basic translation model can be predetermined so as to ensure that the subsequent fine tuning training is only performed on the target neural network of the basic translation model.
Further, when the target neural network needs to be determined, a history translation task corresponding to the target translation task can be determined according to the original language and the target language of the target translation task, wherein the original language and the target language of the history translation task are the same as the original language and the target language of the target translation task; and determining a target neural network influencing the translation accuracy in the basic translation model according to the historical neural network influencing the translation accuracy in the model of the historical translation task.
In one embodiment of the present application, when a target neural network needs to be determined, a history translation task is determined according to the original language and the target language of the target translation task; and determining a historical neural network of the historical translation task according to the network fine adjustment record of the historical translation task, judging whether the target neural network has the same neural network as the historical neural network, and if so, obtaining the target neural network.
Further, when the target neural network needs to be determined, the influence degree of each neural network in the basic language model on the translation accuracy of the target translation task can be judged, and the target neural network is determined according to the influence degree.
In one embodiment of the present application, when a target neural network needs to be determined, an influence degree threshold is predetermined, the influence degree of each neural network on the translation accuracy of the target translation task in the basic language model is determined and judged, and the relationship between the influence degree of each neural network and the influence degree threshold is judged, if the influence degree of a certain neural network is greater than or equal to the influence degree threshold, the neural network is the target neural network.
And step 404, performing fine tuning training on the target neural network in the basic translation model based on the language training sample to obtain a target translation model.
The target language model is used for executing the translation task from the original language to the target language.
In an embodiment of the present application, when fine tuning training is required for a target neural network in a basic translation model, parameter fixing processing may be performed on other neural networks in the basic translation model except for the target neural network in advance, and then, according to a language training sample, the basic translation model after completing the parameter fixing processing is trained, where the foregoing process is fine tuning training for the target neural network in the basic translation model.
According to the translation method, through determining the grammar training sample and the language training sample, the smooth proceeding of the subsequent procedure is ensured, the training sample is provided for the subsequent training, the training effect is ensured, the grammar training can be carried out on the translation model to be trained according to the grammar training sample, the translation accuracy of the subsequent target translation task is improved, the fine tuning training can be carried out on the basic translation model according to the language training sample, and the translation accuracy of the subsequent target translation task is further improved; through determining the target neural network influencing the translation accuracy, the follow-up fine-tuning training of the basic translation model can be successfully performed, only the target neural network is guaranteed to be trained when the basic translation model is subjected to the fine-tuning training, the training efficiency of the fine-tuning training is improved, the training effect of the fine-tuning training is guaranteed, the target translation task can be successfully completed by the target translation model, and the accuracy of the target translation model for executing the target translation task is guaranteed.
It should be noted that, the grammar training sample can be determined through the grammar training task; optionally, as shown in fig. 5, fig. 5 is a flowchart illustrating a step of determining a grammar training sample according to an embodiment of the present application. Specifically, determining the grammar training samples may include the steps of:
Step 501, determining a grammar training task according to the translation precision in the target translation task.
The method comprises the steps that a translation model to be trained can be subjected to grammar training according to a grammar training task, so that the translation model to be trained can have grammar knowledge of target voice, and the grammar training task comprises at least one of a complete blank filling task, an upper sentence and lower sentence prediction task and a multi-language comparison task; further, the grammar training task may include a plurality of tasks, and different tasks included in the grammar training task will not be described herein.
The blank filling task refers to removing part of words in the original text of the target language, and predicting the removed words by the model according to the context of the original text; specifically, the difference between the word predicted by the model and the word originally removed is used as an optimization target, so that the model trained through the complete filling task can accurately predict the word removed.
Further, the task of predicting the upper and lower sentences refers to giving out a plurality of sentences, and enabling a model to judge whether the two sentences have association of the upper and lower sentences or not; for example, if two sentences are: "good morning" and "good your own", then it can be determined that the two sentences are the relationship of upper and lower sentences; if the two sentences are respectively: "good morning" and "45 money" it can be determined that the two sentences are not in a context.
Further, the multi-language comparison task refers to giving out a plurality of sentences in different languages, so that the model judges whether the two sentences are the same semantic; for example, if the two sentences are "Good morning" and "Good ranking", then it is determined that the two sentences are not the same semantic; if the three sentences are "Good moving", "Guten moving", and "Buenos bias", respectively, then it is determined that the two sentences are the same semantic.
The translation precision is used for representing the situation that each certain number of primitive types of words are translated in a target translation task and error words are allowed to appear, wherein the higher the translation precision is, the fewer the primitive types of words which represent the fixed number of translations are allowed to appear; the lower the translation accuracy, the more false words are allowed to occur, which means that a fixed number of primitive species words are translated.
As an implementation manner, when a grammar training task needs to be determined, if the translation precision is higher, more grammar training tasks are needed, so that the grammar training of the translation model to be trained is ensured according to more grammar training tasks, the translation accuracy of the target translation model is higher, and the fewer errors occur when translating primitive words; if the translation accuracy is lower, the fewer grammar training tasks are needed, so that the grammar training of the translation model to be trained is ensured according to the fewer grammar training tasks, the translation accuracy of the target translation model meets the translation accuracy requirement, and the more errors are generated when the primitive word is translated.
When the grammar training task needs to be determined, the grammar training task can be judged according to the working experience of a worker, so that the grammar training task most suitable for the target translation task is selected.
Further, when the grammar training task needs to be determined, the training effect of each grammar training task on the target translation task can be determined in advance, so that the grammar training task most suitable for the target translation task is selected according to the training effect corresponding to each grammar training task.
Step 502, determining grammar training samples according to the original language, the target language and the grammar training task in the target translation task.
It should be noted that, in order to ensure that the translation model to be trained can be successfully trained according to the grammar training tasks, it is necessary to ensure that the grammar training samples corresponding to the grammar training tasks are determined.
Further, when the grammar training sample needs to be determined, the text of the original language and the text of the target language are screened and intercepted according to the concept of the grammar training task, so that the grammar training sample corresponding to the grammar training task is obtained.
As an implementation manner, if the original language is preset to be chinese, the target language is english, and the grammar training task is a complete space filling task, when the grammar training sample needs to be determined, the complete space filling task predicts the missing word according to the context content, so that the chinese and english short contents can be determined respectively, and part of words in the chinese and english short contents are deleted, and the obtained result is the grammar training sample corresponding to the complete space filling task.
As an implementation manner, if the original language is preset to be chinese, the target language is english, and the grammar training task is an upper and lower sentence prediction task, when the grammar training sample needs to be determined, since the upper and lower sentence prediction task needs to determine whether the upper and lower sentences are in an upper and lower sentence relationship, it is necessary to determine a plurality of chinese sentence texts and a plurality of english sentence texts respectively, and combine the plurality of chinese sentence texts and the plurality of english sentence texts in pairs, where two sentences having the upper and lower sentence relationship or two sentences not having the upper and lower sentence relationship in the two sentences after a plurality of combinations are grammar training samples.
As an implementation manner, if the original language is preset to be chinese, the target language is english, and the grammar training task is a multi-language comparison task, when the grammar training sample needs to be determined, since the multi-language comparison task needs to determine whether the meaning expressed by the plurality of sentences is the same meaning, it is necessary to determine a plurality of chinese sentence texts and a plurality of english sentence texts respectively, and randomly combine the plurality of chinese sentence texts and the plurality of english sentence texts, where the obtained random combination result is the grammar training sample.
According to the translation method, through determining the grammar training task, the grammar training sample is ensured to be determined according to the grammar training task, the grammar training sample is ensured to be in line with the type of the grammar training task, the grammar knowledge of the translation model to be trained can be improved according to the grammar training sample, the grammar training of the translation model to be trained is ensured to be successfully performed, and the translation accuracy of the subsequent target translation task is improved.
It should be noted that, the language training sample can be determined by the original language and the target language; optionally, the method comprises the step of. Specifically, determining the language training samples may include the following: and determining a language training sample according to the original language and the target language in the target translation task.
When the language training sample needs to be determined, the primitive sentence and the target language sentence with the same meaning, and the primitive word and the target language word with the same meaning can be used as the language training sample.
Further, the original language in the target translation task may be multiple languages, for example, the target translation task translates multiple languages into english, and then the multiple languages are all primitive languages, that is, english is the target language, so when the language training sample needs to be determined, the sentences and the target language sentences of multiple original languages with the same meaning, the words and the target language words of multiple original languages with the same meaning, where the sentences and the target language sentences of multiple original languages with the same meaning, and the words and the target language words of multiple original languages with the same meaning may be used as the language training sample.
For example, when the original language is Chinese, the target language is English, and the language training sample is sentence, the language training sample may be: "Good in the morning" and "Good playing"; when the original language is chinese, the target language is english, and the language training sample is a word, the language training sample may be: "morning" and "spring".
According to the translation method, through acquiring the language training sample, the follow-up fine-tuning training of the basic translation model is ensured, the accuracy of the follow-up target translation task is further improved, and the target language model obtained through the fine-tuning training is ensured to translate the primitive language into the target language for a longer time and accurately.
It should be noted that, the target neural network can be determined through the history translation task; optionally, as shown in fig. 6, fig. 6 is a flowchart of a step of determining a target neural network according to an embodiment of the present application. Specifically, determining the target neural network may include the following:
step 601, determining a grammar training sample and a language training sample according to a target translation task; wherein the target translation task comprises: original language, target language and translation accuracy.
Step 602, performing grammar training on the translation model to be trained based on the grammar training sample to obtain a basic translation model.
Step 603, determining whether the target translation task has a corresponding historical translation task; the historical translation task is the same as the original language and the target language in the target translation task. If yes, go to step 604, if no, go to step 605.
It should be noted that, by determining the history translation task, it is ensured that the history neural network that affects the translation accuracy is determined when the history translation task is executed can be determined according to the history translation task, so that the target neural network in the basic translation model is determined according to the history neural network.
In one embodiment of the present application, when it is required to determine whether the target translation task has a corresponding history translation task, it may be determined, according to a history of a computer history staff, whether a translation task having the same original language and the same target language as the target translation task exists in the past translation task, and if so, the translation task is determined to be the history translation task.
In another embodiment of the present application, when a plurality of translation tasks having the same original language and the same target language as those in the target translation tasks are determined according to the history of the computer history staff, it is determined whether the translation precision of each translation task is related to the translation precision of the target translation task, so as to implement a translation task in which the translation precision is determined to be closest to the translation precision of the target translation task in each translation task, where the translation task is the target translation task.
And step 604, determining a target neural network affecting language translation accuracy in the basic translation model according to the network fine adjustment record corresponding to the historical translation task.
It should be noted that, in the process of executing the history translation task, the history neural network that affects the translation accuracy is recorded in the network fine adjustment record; therefore, when the target neural network needs to be determined, the historical neural network affecting the translation accuracy can be determined according to the network fine adjustment record, and then the target neural network is determined according to the historical neural network.
In one embodiment of the present application, when a target neural network needs to be determined, a historical neural network affecting the accuracy of model translation in a historical translation task may be determined according to a network trim record corresponding to the historical translation task, and the same network as the historical neural network is determined from a basic translation model, where the network is the target neural network.
Step 605, determining the influence degree of each candidate neural network in the basic language model on the translation accuracy of the target translation task; and determining a target neural network from the candidate neural networks based on the influence degree determination result.
It should be noted that, when the influence degree of a certain candidate neural network on the translation accuracy of the target translation task needs to be determined, the parameters of the other neural networks except the candidate neural network in the basic language model can be all subjected to fixed processing, so as to ensure that the other neural networks except the candidate neural network in the basic language model are not changed during fine tuning training; after the parameters of the other neural networks except the candidate neural network in the basic language model part are all fixed, fine-tuning training is carried out on the basic language model based on language training samples, whether the accuracy of the trained basic language model is changed when a translation task is executed is judged, and if the accuracy is changed, the accuracy change amount of the trained basic language model is determined, wherein the accuracy change amount is the influence degree determination result.
Further, when the target neural network needs to be determined, the influence degree determination result of each candidate neural network can be determined one by one according to the method, and then the target neural network is determined from each candidate neural network according to the influence degree determination result.
In one embodiment of the application, a threshold value of the influence degree is predetermined, when a target neural network needs to be determined, influence degree determining results of candidate neural networks are determined one by one, the magnitude relation between the influence degree determining results of the candidate neural networks and the threshold value of the influence degree is judged, and if the influence degree determining results of the candidate neural networks are greater than or equal to the threshold value of the influence degree, the candidate neural network is determined to be the target neural network; and if the influence degree determination result of the candidate neural network is smaller than the influence degree threshold value, determining that the candidate neural network is not the target neural network.
And step 606, performing fine tuning training on the target neural network in the basic translation model based on the language training sample to obtain a target translation model, wherein the target language model is used for executing the translation task from the original language to the target language.
According to the translation method, whether the history translation record exists or not is judged, so that when the history translation record exists, the target neural network can be determined according to the network fine adjustment record in the history translation record, the smooth determination of the target neural network is ensured, and the follow-up fine adjustment training of the basic translation model can be smoothly performed; when the history translation record does not exist, the influence of each candidate neural network on the translation accuracy of the target translation task can be determined by determining the influence degree determination result, so that the accuracy of the target neural network determination is ensured.
In one embodiment of the present application, as shown in fig. 7, fig. 7 is a flowchart of another translation method provided in the embodiment of the present application, when a target translation task needs to be executed:
step 701, determining a grammar training task according to the translation precision in the target translation task.
The grammar training task comprises at least one of a complete filling task, an upper sentence and lower sentence prediction task and a multi-language comparison task.
Step 702, determining grammar training samples according to the original language, the target language and the grammar training task in the target translation task.
In step 703, language training samples are determined according to the original language and the target language in the target translation task.
And step 704, carrying out grammar training on the translation model to be trained based on the grammar training sample to obtain a basic translation model.
Step 705, determining whether the target translation task has a corresponding history translation task; the history translation task is the same as the original language and the target language in the target translation task, if yes, step 706 is executed, and if no, step 707 is executed.
And step 706, determining a target neural network affecting language translation accuracy in the basic translation model according to the network fine adjustment record corresponding to the historical translation task.
Step 707, determining the influence degree of each candidate neural network in the basic language model on the translation accuracy of the target translation task; and determining a target neural network from the candidate neural networks based on the influence degree determination result.
Step 708, performing fine tuning training on the target neural network in the basic translation model based on the language training sample to obtain a target translation model, wherein the target language model is used for executing the translation task from the original language to the target language.
According to the translation method, through determining the grammar training sample and the language training sample, the smooth proceeding of the subsequent procedure is ensured, the training sample is provided for the subsequent training, the training effect is ensured, the grammar training can be carried out on the translation model to be trained according to the grammar training sample, the translation accuracy of the subsequent target translation task is improved, the fine tuning training can be carried out on the basic translation model according to the language training sample, and the translation accuracy of the subsequent target translation task is further improved; through determining the target neural network influencing the translation accuracy, the follow-up fine-tuning training of the basic translation model can be successfully performed, only the target neural network is guaranteed to be trained when the basic translation model is subjected to the fine-tuning training, the training efficiency of the fine-tuning training is improved, the training effect of the fine-tuning training is guaranteed, the target translation task can be successfully completed by the target translation model, and the accuracy of the target translation model for executing the target translation task is guaranteed.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a translation device for realizing the translation method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation of one or more embodiments of the translation device provided below may be referred to above for the limitation of the translation method, which is not repeated here.
In one embodiment, as shown in fig. 8, fig. 8 is a block diagram of a first translation device provided in an embodiment of the present application, and provides a translation device, including: an acquisition module 10 and an input module 20, wherein:
the obtaining module 10 is configured to obtain content to be translated.
The input module 20 is configured to input the content to be translated into a target language model, and obtain a translation result corresponding to the content to be translated, which is generated by the target language model, where the target language model is obtained by training a grammar training sample and a language training sample determined based on a target translation task.
It should be noted that, inputting the content to be translated into the target language model, performing vector conversion on the content to be translated, and determining the vector to be translated of the content to be translated; and obtaining a translation result corresponding to the content to be translated, which is generated by the target language model, based on the vector to be translated.
In one embodiment, as shown in fig. 9, fig. 9 is a block diagram of a second translation device provided in an embodiment of the present application, where a translation device is provided, and the translation device further includes: a first determination model 30, a training model 40, a second determination module 50, and a fine tuning model 60, wherein:
a first determining model 30 for determining a grammar training sample and a language training sample according to the target translation task; wherein the target translation task comprises: original language, target language and translation accuracy.
The training model 40 is configured to perform grammar training on the translation model to be trained based on the grammar training sample, so as to obtain a basic translation model.
A second determining module 50 is configured to determine a target neural network in the base translation model that affects translation accuracy.
The fine tuning model 60 is used for performing fine tuning training on the target neural network in the basic translation model based on the language training sample to obtain a target translation model, and the target language model is used for executing the translation task from the original language to the target language.
According to the translation device, through determining the grammar training sample and the language training sample, the smooth proceeding of the subsequent process is ensured, the training sample is provided for the subsequent training, the training effect is ensured, the grammar training can be carried out on the translation model to be trained according to the grammar training sample, the translation accuracy of the subsequent target translation task is improved, the fine tuning training can be carried out on the basic translation model according to the language training sample, and the translation accuracy of the subsequent target translation task is further improved; through determining the target neural network influencing the translation accuracy, the follow-up fine-tuning training of the basic translation model can be successfully performed, only the target neural network is guaranteed to be trained when the basic translation model is subjected to the fine-tuning training, the training efficiency of the fine-tuning training is improved, the training effect of the fine-tuning training is guaranteed, the target translation task can be successfully completed by the target translation model, and the accuracy of the target translation model for executing the target translation task is guaranteed.
In one embodiment, as shown in fig. 10, fig. 10 is a block diagram of a third translation device provided in an embodiment of the present application, and a translation device is provided, where a first determining model 30 includes: a first determination unit 31 and a second determination unit 32, wherein:
a first determining unit 31 for determining a grammar training task according to the translation accuracy in the target translation task.
The grammar training task comprises at least one of a complete filling task, an upper sentence and lower sentence prediction task and a multi-language comparison task.
The second determining unit 32 is configured to determine a grammar training sample according to the original language, the target language and the grammar training task in the target translation task.
Further, the language training sample is determined according to the original language and the target language in the target translation task.
According to the translation device, through determining the grammar training task, the grammar training sample is ensured to be determined according to the grammar training task, the grammar training sample is ensured to be in line with the type of the grammar training task, the grammar knowledge of the translation model to be trained can be improved according to the grammar training sample, the grammar training of the translation model to be trained is ensured to be successfully performed, and the translation accuracy of the subsequent target translation task is improved. And moreover, by acquiring the language training sample, the follow-up fine-tuning training of the basic translation model is ensured, the accuracy of the follow-up target translation task is further improved, and the target language model obtained by the fine-tuning training can translate the primitive language into the target language more accurately for a long time.
In one embodiment, as shown in fig. 11, fig. 11 is a block diagram of a fourth translation device provided in an embodiment of the present application, and a translation device is provided, where a second determining module 50 in the translation device includes: a third determination unit 51, a fourth determination unit 52, and a fifth determination unit 53, wherein:
a third determining unit 51, configured to determine whether the target translation task has a corresponding history translation task; the historical translation task is the same as the original language and the target language in the target translation task.
And the fourth determining unit 52 is configured to determine, if yes, a target neural network affecting the accuracy of language translation in the basic translation model according to the network fine adjustment record corresponding to the historical translation task.
A fifth determining unit 53, configured to determine, if not, a degree of influence of each candidate neural network in the basic language model on the translation accuracy of the target translation task; and determining a target neural network from the candidate neural networks based on the influence degree determination result.
According to the translation device, whether the history translation record exists or not is judged, so that when the history translation record exists, the target neural network can be determined according to the network fine adjustment record in the history translation record, the smooth determination of the target neural network is ensured, and the follow-up fine adjustment training of the basic translation model can be smoothly performed; when the history translation record does not exist, the influence of each candidate neural network on the translation accuracy of the target translation task can be determined by determining the influence degree determination result, so that the accuracy of the target neural network determination is ensured.
Each of the modules in the translation apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 12. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a translation method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 12 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
acquiring content to be translated;
inputting the content to be translated into a target language model to obtain a translation result which is generated by the target language model and corresponds to the content to be translated, wherein the target language model is obtained by training a grammar training sample and a language training sample which are determined based on a target translation task.
In one embodiment, the processor when executing the computer program further performs the steps of:
inputting the content to be translated into a target language model, carrying out vector conversion on the content to be translated, and determining a vector to be translated of the content to be translated;
and obtaining a translation result corresponding to the content to be translated, which is generated by the target language model, based on the vector to be translated.
Determining grammar training samples and language training samples according to the target translation task; wherein the target translation task comprises: original language, target language and translation accuracy;
carrying out grammar training on the translation model to be trained based on the grammar training sample to obtain a basic translation model;
determining a target neural network affecting translation accuracy in a basic translation model;
and performing fine tuning training on the target neural network in the basic translation model based on the language training sample to obtain a target translation model, wherein the target language model is used for executing the translation task from the original language to the target language.
In one embodiment, the processor when executing the computer program further performs the steps of:
determining a grammar training task according to the translation precision in the target translation task;
and determining a grammar training sample according to the original language, the target language and the grammar training task in the target translation task.
In one embodiment, the processor when executing the computer program further performs the steps of:
and determining a language training sample according to the original language and the target language in the target translation task.
In one embodiment, the processor when executing the computer program further performs the steps of:
The grammar training task comprises at least one of a complete filling task, an upper sentence and lower sentence prediction task and a multi-language comparison task.
In one embodiment, the processor when executing the computer program further performs the steps of:
determining whether the target translation task has a corresponding historical translation task; the historical translation task is the same as the original language and the target language in the target translation task;
if yes, determining a target neural network affecting language translation accuracy in the basic translation model according to the network fine adjustment record corresponding to the historical translation task.
In one embodiment, the processor when executing the computer program further performs the steps of:
if not, determining the influence degree of each candidate neural network in the basic language model on the translation accuracy of the target translation task;
and determining a target neural network from the candidate neural networks based on the influence degree determination result.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring content to be translated;
inputting the content to be translated into a target language model to obtain a translation result which is generated by the target language model and corresponds to the content to be translated, wherein the target language model is obtained by training a grammar training sample and a language training sample which are determined based on a target translation task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
inputting the content to be translated into a target language model, carrying out vector conversion on the content to be translated, and determining a vector to be translated of the content to be translated;
and obtaining a translation result corresponding to the content to be translated, which is generated by the target language model, based on the vector to be translated.
Determining grammar training samples and language training samples according to the target translation task; wherein the target translation task comprises: original language, target language and translation accuracy;
carrying out grammar training on the translation model to be trained based on the grammar training sample to obtain a basic translation model;
determining a target neural network affecting translation accuracy in a basic translation model;
and performing fine tuning training on the target neural network in the basic translation model based on the language training sample to obtain a target translation model, wherein the target language model is used for executing the translation task from the original language to the target language.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining a grammar training task according to the translation precision in the target translation task;
and determining a grammar training sample according to the original language, the target language and the grammar training task in the target translation task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and determining a language training sample according to the original language and the target language in the target translation task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the grammar training task comprises at least one of a complete filling task, an upper sentence and lower sentence prediction task and a multi-language comparison task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining whether the target translation task has a corresponding historical translation task; the historical translation task is the same as the original language and the target language in the target translation task;
if yes, determining a target neural network affecting language translation accuracy in the basic translation model according to the network fine adjustment record corresponding to the historical translation task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if not, determining the influence degree of each candidate neural network in the basic language model on the translation accuracy of the target translation task;
and determining a target neural network from the candidate neural networks based on the influence degree determination result.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
acquiring content to be translated;
inputting the content to be translated into a target language model to obtain a translation result which is generated by the target language model and corresponds to the content to be translated, wherein the target language model is obtained by training a grammar training sample and a language training sample which are determined based on a target translation task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
inputting the content to be translated into a target language model, carrying out vector conversion on the content to be translated, and determining a vector to be translated of the content to be translated;
and obtaining a translation result corresponding to the content to be translated, which is generated by the target language model, based on the vector to be translated.
Determining grammar training samples and language training samples according to the target translation task; wherein the target translation task comprises: original language, target language and translation accuracy;
carrying out grammar training on the translation model to be trained based on the grammar training sample to obtain a basic translation model;
determining a target neural network affecting translation accuracy in a basic translation model;
And performing fine tuning training on the target neural network in the basic translation model based on the language training sample to obtain a target translation model, wherein the target language model is used for executing the translation task from the original language to the target language.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining a grammar training task according to the translation precision in the target translation task;
and determining a grammar training sample according to the original language, the target language and the grammar training task in the target translation task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and determining a language training sample according to the original language and the target language in the target translation task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
the grammar training task comprises at least one of a complete filling task, an upper sentence and lower sentence prediction task and a multi-language comparison task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining whether the target translation task has a corresponding historical translation task; the historical translation task is the same as the original language and the target language in the target translation task;
If yes, determining a target neural network affecting language translation accuracy in the basic translation model according to the network fine adjustment record corresponding to the historical translation task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if not, determining the influence degree of each candidate neural network in the basic language model on the translation accuracy of the target translation task;
and determining a target neural network from the candidate neural networks based on the influence degree determination result.
It should be noted that, user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (12)

1. A method of translation, the method comprising:
acquiring content to be translated;
inputting the content to be translated into a target language model to obtain a translation result which is generated by the target language model and corresponds to the content to be translated, wherein the target language model is obtained by training a grammar training sample and a language training sample which are determined based on a target translation task.
2. The method of claim 1, wherein the inputting the content to be translated into a target language model to obtain a translation result corresponding to the content to be translated, the translation result being generated by the target language model, includes:
inputting the content to be translated into the target language model, carrying out vector conversion on the content to be translated, and determining a vector to be translated of the content to be translated;
and obtaining the translation result corresponding to the content to be translated, which is generated by the target language model, based on the vector to be translated.
3. The method of claim 1, wherein training the target language model based on the grammar training samples and the language training samples determined by the target translation task comprises:
determining grammar training samples and language training samples according to the target translation task; wherein the target translation task comprises: original language, target language and translation accuracy;
carrying out grammar training on the translation model to be trained based on the grammar training sample to obtain a basic translation model;
determining a target neural network affecting translation accuracy in the basic translation model;
and performing fine tuning training on the target neural network in the basic translation model based on the language training sample to obtain a target translation model, wherein the target language model is used for executing the translation task from the original language to the target language.
4. The method of claim 3, wherein determining a grammar training sample based on the target translation task comprises:
determining a grammar training task according to the translation precision in the target translation task;
and determining the grammar training sample according to the original language, the target language and the grammar training task in the target translation task.
5. The method of claim 3, wherein determining the language training samples based on the target translation task comprises:
and determining the language training sample according to the original language and the target language in the target translation task.
6. The method of claim 4, wherein the grammar training tasks include at least one of a complete gap-filling task, a sentence-in-sentence prediction task, and a multi-language collation task.
7. A method according to claim 3, wherein said determining a target neural network in said underlying translation model that affects translation accuracy comprises:
determining whether the target translation task has a corresponding historical translation task; the history translation task is the same as the original language and the target language in the target translation task;
If yes, determining the target neural network affecting language translation accuracy in the basic translation model according to a network fine adjustment record corresponding to the historical translation task.
8. The method of claim 7, wherein the method further comprises:
if not, determining the influence degree of each candidate neural network in the basic language model on the translation accuracy of the target translation task;
and determining a target neural network from the candidate neural networks based on the influence degree determination result.
9. A translation apparatus, the apparatus comprising:
the acquisition module is used for acquiring the content to be translated;
the input module is used for inputting the content to be translated into a target language model to obtain a translation result which is generated by the target language model and corresponds to the content to be translated, wherein the target language model is obtained by training a grammar training sample and a language training sample which are determined based on a target translation task.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 8.
12. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 8.
CN202310168655.9A 2023-02-14 2023-02-14 Translation method, translation device, computer equipment and storage medium thereof Pending CN116187353A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310168655.9A CN116187353A (en) 2023-02-14 2023-02-14 Translation method, translation device, computer equipment and storage medium thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310168655.9A CN116187353A (en) 2023-02-14 2023-02-14 Translation method, translation device, computer equipment and storage medium thereof

Publications (1)

Publication Number Publication Date
CN116187353A true CN116187353A (en) 2023-05-30

Family

ID=86440144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310168655.9A Pending CN116187353A (en) 2023-02-14 2023-02-14 Translation method, translation device, computer equipment and storage medium thereof

Country Status (1)

Country Link
CN (1) CN116187353A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116933807A (en) * 2023-09-14 2023-10-24 成都帆点创想科技有限公司 Text translation method, device, equipment and readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116933807A (en) * 2023-09-14 2023-10-24 成都帆点创想科技有限公司 Text translation method, device, equipment and readable storage medium
CN116933807B (en) * 2023-09-14 2023-12-29 成都帆点创想科技有限公司 Text translation method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US11328129B2 (en) Artificial intelligence system using phrase tables to evaluate and improve neural network based machine translation
US11157693B2 (en) Stylistic text rewriting for a target author
CN108647205B (en) Fine-grained emotion analysis model construction method and device and readable storage medium
US20200327196A1 (en) Chatbot generator platform
JP5901001B1 (en) Method and device for acoustic language model training
CN111563144B (en) User intention recognition method and device based on statement context prediction
KR20200014510A (en) Method for providing prediction service based on mahcine-learning and apparatus thereof
CN110222330B (en) Semantic recognition method and device, storage medium and computer equipment
EP2891043A1 (en) Personal language model for input method editor
CN112948534A (en) Interaction method and system for intelligent man-machine conversation and electronic equipment
CN110209802B (en) Method and device for extracting abstract text
CN114757176A (en) Method for obtaining target intention recognition model and intention recognition method
KR20200119393A (en) Apparatus and method for recommending learning data for chatbots
CN106030568A (en) Natural language processing system, natural language processing method, and natural language processing program
CN110991193B (en) OpenKiwi-based translation matrix model selection system
CN114881035A (en) Method, device, equipment and storage medium for augmenting training data
CN116187353A (en) Translation method, translation device, computer equipment and storage medium thereof
CN112559725A (en) Text matching method, device, terminal and storage medium
EP4145361A1 (en) Augmentation of machine learning pipeline corpus for synthesizing new machine learning pipelines
CN115952266A (en) Question generation method and device, computer equipment and storage medium
CN112799658B (en) Model training method, model training platform, electronic device, and storage medium
CN114969372A (en) Relationship extraction method, system, device and storage medium
CN114896382A (en) Artificial intelligent question-answering model generation method, question-answering method, device and storage medium
CN112905763A (en) Session system development method, device, computer equipment and storage medium
US20210142010A1 (en) Learning method, translation method, information processing apparatus, and recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination