CN117034968A - Neural machine translation method, device, electronic equipment and medium - Google Patents

Neural machine translation method, device, electronic equipment and medium Download PDF

Info

Publication number
CN117034968A
CN117034968A CN202311304326.9A CN202311304326A CN117034968A CN 117034968 A CN117034968 A CN 117034968A CN 202311304326 A CN202311304326 A CN 202311304326A CN 117034968 A CN117034968 A CN 117034968A
Authority
CN
China
Prior art keywords
source
target
template
sentence
decoder
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.)
Granted
Application number
CN202311304326.9A
Other languages
Chinese (zh)
Other versions
CN117034968B (en
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.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
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 Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN202311304326.9A priority Critical patent/CN117034968B/en
Publication of CN117034968A publication Critical patent/CN117034968A/en
Application granted granted Critical
Publication of CN117034968B publication Critical patent/CN117034968B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (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)
  • Audiology, Speech & Language Pathology (AREA)
  • Machine Translation (AREA)

Abstract

The invention provides a neural machine translation method, a neural machine translation device, electronic equipment and a neural machine translation medium, and belongs to the technical field of machine translation. The method is applied to a machine translation model comprising an encoder and a decoder, the method comprising: identifying a target translation rule template corresponding to a source language sentence to be translated, wherein the target translation rule template comprises a first source end template, a first target end template and a first source end variable fragment; obtaining input of an encoder based on the first constraint prompt sequence and the source language sentence to be translated; obtaining an input of the decoder based on the first constraint cue sequence and an initial input sequence of the decoder; the first constraint prompt sequence is obtained by sequentially splicing the first source end template, the first source end variable fragment and the first target end template; based on the input of the encoder and the input of the decoder, a translation result output by the machine translation model is obtained. The neural machine translation method provided by the invention can improve the translation accuracy.

Description

Neural machine translation method, device, electronic equipment and medium
Technical Field
The present invention relates to the field of machine translation technologies, and in particular, to a neural machine translation method, a device, an electronic apparatus, and a medium.
Background
Machine translation refers to a technique of translating sentences in one source language into sentences in another target language using a computer. Currently mainstream neural machine translation, implemented using deep neural networks based on encoder-decoder frameworks, has been served in various industries. However, in translation scenarios in particular fields of great expertise, such as aviation, medical, etc., there are often a number of prior constraints on the translation rule templates. The language expression forms of the scenes have strict industry standardization requirements, and the organization of the source language and the target language must meet specific format requirements. The conventional neural machine translation method mainly takes bilingual parallel sentence pairs of natural language as data during training, and after training is completed, sentences constrained by a translation rule template cannot be translated correctly because the sentences do not conform to the normal expression of the natural language.
The main translation methods considering constraints at present are to apply vocabulary constraints to intervene in the translation of certain vocabularies, and there is no way to deal with the translation of regular sentence patterns. The other type of law is that the rule sentence pattern is firstly identified through translation calibration and editing before or after translation, and then the translation is assembled, but the method can only independently identify the variable to translate in isolation, and the translation inaccuracy is caused by no way to consider the context of the variable; the calibration link also increases additional translation time to affect efficiency; in addition, when more than one translation rule is used, the priority of the translation rule must be explicitly formulated to be executed one by one, otherwise, the conflict of the translation rules may occur.
Disclosure of Invention
The invention provides a neural machine translation method, a device, electronic equipment and a medium, which are used for solving the problem that the traditional machine translation method in the prior art cannot accurately translate under the premise of constraint of a translation rule template.
The invention provides a neural machine translation method, which is applied to a machine translation model, wherein the machine translation model comprises an encoder and a decoder, and is used for translating a source language sentence into a target language sentence, and the method comprises the following steps:
identifying a target translation rule template corresponding to a source language sentence to be translated, wherein the target translation rule template comprises a first source end template, a first target end template and a first source end variable fragment, the first source end template is constructed based on the source language sentence to be translated, the first target end template is constructed based on a sentence fragment of a target language, and the first source end variable fragment comprises at least one sentence fragment in the source language sentence;
the input of the encoder is obtained based on a first constraint prompt sequence and the source language sentence to be translated, wherein the first constraint prompt sequence is obtained by sequentially splicing the first source end template, the first source end variable fragment and the first target end template;
Obtaining an input of the decoder based on the first constraint prompt sequence and an initial input sequence of the decoder, wherein the initial input sequence of the decoder is used for indicating the decoder to start decoding;
and obtaining a translation result output by the machine translation model based on the input of the encoder and the input of the decoder.
In some embodiments, the obtaining the input of the encoder based on the first constraint hint sequence and the source language sentence to be translated includes:
splicing the first source end template, the first source end variable fragment and the source language sentence to be translated to obtain the input of the encoder;
the obtaining the input of the decoder based on the first constraint prompt sequence and the initial input sequence of the decoder includes:
and splicing the first target end template with the initial input sequence of the decoder to obtain the input of the decoder.
In some embodiments, the machine translation model is trained by:
constructing a second translation rule template based on word alignment relations between source language sentences and target language sentences in the parallel corpus sample, wherein the second translation rule template comprises a second source end template, a second target end template and a second source end variable fragment;
Sequentially splicing the second source end template, the second source end variable fragment and the second target end template to obtain a second constraint prompt sequence;
based on the second constraint prompt sequence, splicing the second source template, the second source variable fragment and the source language sentence to obtain first training data, wherein the first training data is input by the encoder;
based on the second constraint prompt sequence, splicing the second target end template with the initial input sequence of the decoder to obtain second training data; the second training data is input to the decoder;
the machine translation model is trained based on the first training data and the second training data.
In some embodiments, the constructing a second translation rule template based on word alignment relationships between the source language sentence and the target language sentence in the parallel corpus sample includes:
determining Bernoulli distribution parameters corresponding to bilingual sentence pairs in a parallel corpus sample based on word alignment relations between source language sentences and target language sentences in the parallel corpus sample;
constructing the second translation rule template based on the double sentence pair under the condition that the Bernoulli distribution parameter corresponding to the double sentence pair exceeds a probability threshold;
And under the condition that the Bernoulli distribution parameters corresponding to the double sentence pairs do not exceed the probability threshold, determining the double sentence pairs as third training data, wherein the third training data is used for training the machine translation model.
In some embodiments, the constructing the second translation rule template based on the bilingual sentence pair includes:
determining at least one sentence fragment in the continuous aligned sentence fragments as the second source variable fragment in the continuous aligned sentence fragments corresponding to the bilingual sentence pairs;
replacing the second source variable fragment in the sentence fragment corresponding to the source language sentence with a variable placeholder to obtain the second source template;
and replacing the target variable fragment with a variable placeholder to obtain the second target template, wherein the target variable fragment is a sentence fragment with word alignment relation with the second source variable fragment in the second target template.
In some embodiments, the sequentially splicing the second source end template, the second target end template and the second source end variable fragment to obtain a second constraint prompt sequence includes:
and adding a spacer between the second source end template and the second source end variable fragment, and adding a spacer between the second source end variable fragment and the second target end template to obtain the second constraint prompt sequence.
The present invention also provides a neural machine translation device applied to a machine translation model including an encoder and a decoder, the machine translation model being used for translating a source language sentence into a target language sentence, the device comprising:
the system comprises an identification module, a translation module and a translation module, wherein the identification module is used for identifying a target translation rule template corresponding to a source language sentence to be translated, the target translation rule template comprises a first source end template, a first target end template and a first source end variable fragment, the first source end template is constructed based on the source language sentence to be translated, the first target end template is constructed based on a sentence fragment of a target language, and the first source end variable fragment comprises at least one sentence fragment in the source language sentence;
the first processing module is used for obtaining the input of the encoder based on a first constraint prompt sequence and the source language sentence to be translated, wherein the first constraint prompt sequence is obtained by sequentially splicing the first source end template, the first source end variable fragment and the first target end template;
the second processing module is used for obtaining the input of the decoder based on the first constraint prompt sequence and the initial input sequence of the decoder, wherein the initial input sequence of the decoder is used for indicating the decoder to start decoding;
And the translation module is used for obtaining a translation result output by the machine translation model based on the input of the encoder and the input of the decoder.
In some embodiments, the first processing module is specifically configured to:
splicing the first source end template, the first source end variable fragment and the source language sentence to be translated to obtain the input of the encoder;
the second processing model is specifically configured to:
and splicing the first target end template with the initial input sequence of the decoder to obtain the input of the decoder.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the neural machine translation method as described in any of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a neural machine translation method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a neural machine translation method as described in any of the above.
According to the neural machine translation method, the device, the electronic equipment and the medium, the target translation rule template is obtained by identifying the source language sentence to be translated, and the target translation rule template is converted into the first constraint prompt sequence, so that the target translation rule template can be input into the model like a conventional source language sentence sequence without considering the priority problem of a plurality of translation rules; based on the first constraint prompt sequence, the language sentence to be translated and the initial input sequence of the decoder, the input of the encoder and the input of the decoder in the machine translation model are obtained, so that complete semantic information of the variable in the whole sentence can be considered when the variable is translated, and the translation is more accurate.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a neural machine translation method provided by the invention;
FIG. 2 is a schematic diagram of translation rule template data construction and constraint hint sequence conversion for the neural machine translation method provided by the invention;
FIG. 3 is a second flow chart of the neural machine translation method according to the present invention;
FIG. 4 is a schematic diagram of a translation process of the neural machine translation method provided by the present invention;
FIG. 5 is a schematic diagram of a neural machine translation device according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The conventional neural machine translation method mainly takes bilingual parallel sentence pairs of natural language as data during training, and after training is completed, sentences constrained by a translation rule template cannot be translated correctly because the sentences do not conform to the normal expression of the natural language. The current main translation method considering constraint is to apply vocabulary constraint to intervene in translation of certain vocabularies, and no method is available to process translation of regular sentence patterns; another type of law is through translation calibration and editing either before or after translation. The machine translation method cannot flexibly, efficiently and accurately translate under the premise of constraint of a translation rule template.
The neural machine translation method, apparatus, electronic device, and medium of the present invention are described below with reference to fig. 1 to 6.
The invention provides a neural machine translation method which is applied to a machine translation model, wherein the machine translation model comprises an encoder and a decoder and is used for translating a source language sentence into a target language sentence.
Fig. 1 is a schematic flow chart of a neural machine translation method provided by the invention. Referring to fig. 1, the neural machine translation method provided by the present invention includes: step 110, step 120, step 130 and step 140.
Step 110, identifying a target translation rule template corresponding to a source language sentence to be translated, wherein the target translation rule template comprises a first source end template, a first target end template and a first source end variable fragment, the first source end template is constructed based on the source language sentence to be translated, the first target end template is constructed based on the sentence fragment of the target language, and the first source end variable fragment comprises at least one sentence fragment in the source language sentence;
step 120, obtaining input of an encoder based on a first constraint prompt sequence and a source language sentence to be translated, wherein the first constraint prompt sequence is obtained by sequentially splicing a first source end template, a first source end variable fragment and a first target end template;
Step 130, obtaining an input of the decoder based on the first constraint prompt sequence and an initial input sequence of the decoder, wherein the initial input sequence of the decoder is used for indicating the decoder to start decoding;
and 140, obtaining a translation result output by the machine translation model based on the input of the encoder and the input of the decoder.
The execution subject of the neural machine translation method provided by the invention can be an electronic device, a component in the electronic device, an integrated circuit, or a chip. The electronic device may be a mobile electronic device or a non-mobile electronic device. By way of example, the mobile electronic device may be a cell phone, tablet computer, notebook computer, palm computer, vehicle mounted electronic device, wearable device, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device may be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., without limitation of the present invention.
The following describes the technical scheme of the present invention in detail by taking a computer to execute the neural machine translation method provided by the present invention as an example.
It should be noted that, in the translation process of the natural language, the sentences of the first language class may be translated into the sentences of the second language class. The sentences of the first language class are source language sentences and the sentences of the second language class are target language sentences. For example, a chinese sentence is translated into an english sentence, the chinese sentence being the source language sentence, and the english sentence being the target language sentence. The language of the source language and the target language is not particularly limited in the present invention.
For example, the machine translation model would sentence "I have to solve this problem". "translate to sentence" I must solution thesoblem. Where the sentence "i have to solve this problem". "is a source language sentence, and the sentence" I must solution the problem "is a target language sentence.
Typically, the machine translation model employs a model structure of an encoder-decoder. In the process of translating the source language sentence, the machine translation model takes the source language sentence as the input of the encoder, and encodes the source language sentence to output an intermediate representation. The intermediate representation is used as an input to a decoder, which decodes the intermediate representation into a target language sentence.
In actual implementation, the machine translation model in the invention is constructed based on a transducer structure, is trained by using an adaptive motion estimation (Adam) optimization algorithm, and updates network parameters of the translation model. Adam optimization algorithm is an extension of gradient descent, which techniques can automatically adjust the learning rate for each input variable of the objective function and update the variables by using moving averages that exponentially decrease the gradient.
In step 110, sentences based on the source language to be translatedxRegular matching is carried out in a pre-constructed translation rule template library, and a target translation rule template which accords with the regular matching is found; wherein the translation rule template library comprises a plurality of translation rule templates comprising regular expression forms.
The translation rule template constrains the specific formats of the source language sentence and the target language sentence, the template generally comprises variables and non-variables, the contents of the variables are flexible and changeable and need to be translated normally, and the contents of the non-variables are kept unchanged and need to be translated fixedly.
Translation rule templates are illustrated with translation examples in the aviation field.
The source language sentence to be translated is: "REF RO.123 FIN card installation of placards in lavatories ON M456";
The translation of the correct target language sentence is: "according to the operation requirement of No. 123, the work of adding the sign in the toilet is completed on the M456 plane. ";
the translation rule templates are: "[ REF ]] {V1} [FIN]{V2} [ON]{ V3} [ according to]{ V1}, in]{ V3} [ on aircraft, complete]{ V2} [ work ]]", wherein'Fragments in "are non-variable fragments, and fragments in" { } "refer to variable fragments. Non-variable refers to a constant, constant property or feature, and variable is a variable quantity. It is understood that the "fragment" referred to in the present invention may be a sentence fragment.
Target translation rule templateWherein->The first source end template, the first target end template and the first source end variable fragment of the target translation rule template are respectively represented.
For example: source language sentencexThe method comprises the following steps:
The export of electric vehicles increased by 23% year-on-year.
target language sentenceyThe method comprises the following steps: the outlet of the electric automobile is increased by 23% in the same ratio.
Target translation rule templateComprising the following steps: first Source template->First target template->And a first source variable fragment->
First source end templateBased on the construction of the source language sentence to be translated, the first source template +.>The method comprises the following steps:<PV1>increased by<PV2>year-on-year。
the first target end template is constructed based on sentence fragments of target languageThe method comprises the following steps: <PV1>Homonymous growth<PV2>。
The first source variable fragment comprises at least one sentence fragment in a source language sentence; first Source variable fragmentThe method comprises the following steps: the export of electric vehicles<SEP>23%。
Wherein the symbols "< PV1>", "< PV2>" and "< SEP >" will be described in the subsequent embodiments.
Template the target translation ruleConversion to a constraint cue sequence, i.e.according to the first source template +.>First Source variable fragment->First target template->After sequential splicing of (C) with special symbol in the middle "<Ste>”、“<Var>"He"<Tte>"first restriction hint sequence is obtained by separation> <Ste> /> <Var> /> <Tte>
In steps 120 and 130, a sentence in the source language to be translated based on the first constraint hint sequence and the first constraint hint sequencexAnd an initial input sequence of the decoder, constructing data comprising a first constrained hint sequence. The first constraint prompt sequence can be split into two sections of source constraint and target constraint.
In actual execution, the source constraint of the first constraint hint sequence may be spliced with the source language sentence to be translated as a source input, i.e. the input of the encoder. And splicing the target end constraint of the first constraint prompt sequence and the initial input sequence of the decoder to serve as target end initial input, namely the input of the decoder.
Wherein the initial input sequence of the decoder is a character sequence input by the decoder before starting to generate the first target translation word, and the character sequence is used for starting the decoding process. The initial input sequence typically employs a special character "< bos >".
In step 140, after obtaining the input of the encoder and the input of the decoder, the machine translation model may output the translation result of the target language.
According to the neural machine translation method provided by the invention, the target translation rule template is obtained by identifying the source language sentence to be translated, and the target translation rule template is converted into the first constraint prompt sequence, so that the target translation rule template can be input into the model like a conventional source language sentence sequence without considering the priority problem of a plurality of translation rules; based on the first constraint prompt sequence, the language sentence to be translated and the initial input sequence of the decoder, the input of the encoder and the input of the decoder in the machine translation model are obtained, so that complete semantic information of the variable in the whole sentence can be considered when the variable is translated, and the translation is more accurate.
In some embodiments, step 120 may include:
splicing the first source end template, the first source end variable fragment and the source language sentence to be translated to obtain the input of the encoder;
Step 130 may include:
and splicing the first target end template with the initial input sequence of the decoder to obtain the input of the decoder.
In actual implementation, the source constraint of the first constraint hint sequence includes a first source template and a first source variable fragment, where the source constraint may be expressed as <Ste> /> <Var> />The target-side constraint of the first constraint hint sequence comprises a first target-side template, the target-side constraint may be expressed as +.> <Tte> />
Constraining source end <Ste> /> <Var> />With the source language sentence to be translatedxThe symbol is added between "<Src>Splicing to obtain input of encoder "<Ste> /> <Var> /> <Src> />”。
Constraining target ends <Tte> />Initial input sequence with decoder "<bos>"previously added symbol"<Trg>Splicing to obtain decoder input "<Tte> /> <Trg><bos>”。
If a plurality of translation rule templates are identified, a plurality of translation rule templates are firstly arranged at a source endSplicing and then adding the source language sentence to be translated>Splicing, and similarly, corresponding multiple pieces of +.>Splicing and then combining with<bos>And (5) splicing. As long as it is guaranteed->Andthe two parts are in one-to-one correspondence, and the splicing sequence is not required.
According to the neural machine translation method provided by the invention, the input of the encoder and the input of the decoder in the machine translation model are obtained based on the first constraint prompt sequence, the language sentence to be translated and the initial input sequence of the decoder, so that the output translation result can be effectively constrained.
In some embodiments, the machine translation model is trained by:
constructing a second translation rule template based on word alignment relations between source language sentences and target language sentences in the parallel corpus sample, wherein the second translation rule template comprises a second source end template, a second target end template and a second source end variable fragment;
sequentially splicing a second source end template, a second source end variable fragment and a second target end template to obtain a second constraint prompt sequence;
based on a second constraint prompt sequence, splicing a second source end template, a second source end variable fragment and a source language sentence to obtain first training data, wherein the first training data is input by an encoder;
based on a second constraint prompt sequence, splicing a second target end template with an initial input sequence of a decoder to obtain second training data; the second training data is input to the decoder;
the machine translation model is trained based on the first training data and the second training data.
In actual implementation, the steps of the machine translation model are as follows:
step 1: parallel corpus translation from conventional machineA lot of parallel corpus samples are selected +.>According to source language sentence->And target language sentence- >Word alignment relationship between them, automatically constructing pseudo-translation rule templatesI.e. a second translation rule template. Wherein (1)>And the second source end template, the second target end template and the second source end variable fragment respectively represent the second translation rule template.
It should be noted that, the parallel corpus refers to that the same text content of two or more languages is correspondingly stored in the same data table, so as to facilitate comparison research and translation. Word alignment refers to the correspondence between each word and its translation in a bilingual pair.
Step 2: template a second translation ruleConversion to a second restriction hint sequence, i.e.according to a second source template +.>Second Source variable fragment->Second order ofLabel end template->After sequential splicing of (C) with special symbol in the middle "<Ste>”、“<Var>"He"<Tte>"first restriction hint sequence is obtained by separation> <Ste> /> <Var> <Tte> />
Step 3: data is constructed containing constraint hints. Constraining the source end of the second constraint prompt sequence <Ste> /> <Var> />With source language sentences in parallel corpus samplesxThe symbol is added between "<Src>Splicing to obtain first training data "<Ste> /> <Var> /> <Src> />The first training data may be input to the encoder.
Constraining the target end of the second constraint prompt sequence <Tte> />Initial input sequence to decoder<bos>Adding the symbol'<Trg>Splicing to obtain second training data "<Tte> /> <Trg><bos>The second training data may be used as an initial input to the decoder.
If a plurality of translation rule templates exist, a plurality of translation rule templates are firstly arranged at a source endSplicing and then combining withxSplicing, and similarly, corresponding multiple pieces of +.>Splicing and then combining with<bos>And (5) splicing. As long as it is guaranteed->And->The two parts are in one-to-one correspondence, and the sequence is not required.
Source language sentencexSentence of target languageyThe word alignment of (2) is shown in figure 2.
Wherein the source language sentencexThe method comprises the following steps:
The export of electric vehicles increased by 23% year-on-year.
target language sentenceyThe method comprises the following steps: the outlet of the electric automobile is increased by 23% in the same ratio.
Translation rule templateComprising the following steps:
source end template:<PV1> increased by <PV2> year-on-year
Target end template:<PV1>Homonymous growth<PV2>
Source variable fragment:The export of electric vehicles <SEP> 23%
Constrained hint sequences:<Ste><PV1> increased by <PV2> year-on-year<Var>The export of electric vehicles <SEP> 23% <Tte><PV1>Homonymous growth<PV2>。
Step 4: training data set comprising second constraint prompt sequenceAnd the remaining conventional training data setAnd mixing to perform model training.
Step 5: and after training, deploying the machine model. After deployment is completed, when the model is actually used, firstly, a translation rule template in a source language sentence to be translated is identified through a regular expression and other modes, then, the construction of a constraint prompt sequence is carried out in a step 2 mode, and then, test data are constructed in a step 3 mode for testing.
According to the neural machine translation method provided by the invention, the second translation rule template is constructed in the model training stage, so that the first training data and the second training data containing the second constraint prompt sequence can be automatically generated, and the translation requirement after the constraint of the translation rule template is provided can be met.
In some embodiments, constructing a second translation rule template based on word alignment relationships between source language sentences and target language sentences in the parallel corpus sample includes:
determining Bernoulli distribution parameters corresponding to bilingual sentence pairs in the parallel corpus sample based on word alignment relations between source language sentences and target language sentences in the parallel corpus sample;
under the condition that the Bernoulli distribution parameter corresponding to the double sentence pair exceeds the probability threshold value, constructing a second translation rule template based on the double sentence pair;
and under the condition that the Bernoulli distribution parameters corresponding to the bilingual sentence pairs do not exceed the probability threshold value, determining the bilingual sentence pairs as third training data, wherein the third training data is used for training a machine translation model.
In actual implementation, in the whole translation parallel corpus training setThe word alignment tool is operated on to obtain each parallel double sentence pair (++ >) Word alignment relationship of (c). The word alignment tool used is the open source tool fast-align.
Traversing training setFor each bilingual sentence pair (++)>) Based on the Bernoulli distribution, it is determined whether to select it as constraint training data (first training data or second training data). The bernoulli distribution parameters determine the probability of being selected as constraint training data.
Under the condition that the Bernoulli distribution parameter corresponding to the bilingual sentence pair exceeds the probability threshold value, the bilingual sentence pair is @, and) Can be selected to add constraint training set +.>. Then can be based on double statement pairs (+)>) Constructing a secondA translation rule template;
under the condition that the Bernoulli distribution parameter corresponding to the bilingual sentence pair does not exceed the probability threshold value, the bilingual sentence pair is @, and) Can not be selected, and added into the unconstrained training set +.>I.e. third training data.
The first training data, the second training data, and the third training data may be mixed for model training.
According to the neural machine translation method provided by the invention, model training is carried out by mixing the first training data, the second training data and the third training data, namely, a mixed training mode of constraint prompt data and conventional translation data is adopted, so that the machine translation model can meet the conventional translation requirement when no constraint exists, and can also meet the translation requirement after constraint of a translation rule template is provided.
In some embodiments, constructing a second translation rule template based on the pair of double sentences includes:
determining at least one sentence fragment in the continuous aligned sentence fragments as a second source variable fragment in the continuous aligned sentence fragments corresponding to the bilingual sentence pairs;
replacing a second source variable fragment in the sentence fragments corresponding to the source language sentences with the variable placeholders to obtain a second source template;
and replacing the target variable fragment with the variable placeholder to obtain a second target end template, wherein the target variable fragment is a sentence fragment with word alignment relation with the second source variable fragment in the second target end template.
In actual execution, for constraint training setIn (2) according to word alignment result, finding out source language sentence ++>And target language sentence->The longest continuous aligned segment of intermediate length. For target language sentences->Is +.>Fragments->If all words therein are in +.>Find word alignment from target to source, and in +.>Corresponding words->And->There is no alignment relation between the corresponding words from the source end to the target end beyond +.>The source fragment is then +.>And target fragment- >As a set of aligned segments. Assume Source language sentence +.>And target language sentence->The longest continuous alignment fragment of (2) is +.>. Wherein include->Alignment fragment, th->The source and target end lengths of the aligned fragments are +.>And->
In the continuous aligned statement fragments, random samplingThe sentence fragments are used as second source variable fragments,the remaining sentence fragments are used as source non-variable fragments.
The second source variable fragments are arranged with variable placeholders according to the appearance sequence of the second source variable fragments "<PV1>”、“<PV2>”…“<PV>"replace, as second Source template->
Replacing the target end variable fragments with the alignment relations by corresponding variable placeholders as a second target end template
Arranging the second source variable fragments in the sequence of the source variable fragments, and arranging the second source variable fragments in the sequence of the source variable fragments "<SEP>Symbol separation as second source variable segment
In some embodiments, splicing the second source end template, the second source end variable fragment, and the second target end template in order to obtain a second constraint prompt sequence includes:
and adding a spacer between the second source end template and the second source end variable fragment, and adding a spacer between the second source end variable fragment and the second target end template to obtain a second constraint prompt sequence.
At the second source endSecond Source variable fragment->Second target template->The three sequences are respectively added with a spacer "<Ste>”、“<Var>”、“<Tte>", a second constraint prompt sequence is obtained"<Ste> /> <Var> <Tte> />”。/>
Source side constraint of second constraint prompt sequence "<Ste> <Var> />", by spacers'<Src>", with the input source language sentence +.>Splicing to obtain input sequence of encoder "<Ste> /> <Var> /> <Src> />", the input to the encoder is obtained.
Target end constraint of enemy constraint prompt sequence "<Tte> ", by spacers'<Trg>"and initial input sequence of decoder<bos>Splicing and adding the symbol'<Trg>Splicing as an initial input sequence for a decoder "<Tte> /> <Trg><bos>", the input to the decoder is obtained.
For the third training dataConventional bilingual data in (++)>) Will->And'<bos>"source side input (input of encoder) and target side initial input (input of decoder) as models, respectively.
MixingAnd->As training data for neural machine translation models.
FIG. 3 is a second flow chart of the neural machine translation method according to the present invention. Referring to fig. 3, the neural machine translation method provided by the present invention includes a training phase and a testing phase.
The training phase flow is as follows:
step 1: sampling from parallel corpus, and determining whether the parallel corpus sample can be used as constraint training data according to word alignment results. Under the condition that parallel corpus samples are used as constraint training data, a pseudo translation rule template is constructed, and step 2 is entered. And under the condition that the parallel corpus sample cannot be used as constraint training data, the parallel corpus sample is used as a mixed training corpus.
Step 2: the translation rule template is converted into a constraint hint sequence. The constraint prompt sequence can be split into two sections of source end constraint and target end constraint.
Step 3: splicing the source constraint of the constraint prompt sequence and the source language sentence to be translated to be used as source input, and splicing the target constraint of the constraint prompt sequence and the "< bos >" to be used as target initial input.
Step 4: in the training phase, constraint prompt training data and conventional translation training data are mixed for training.
Step 5: in the test stage, if the source language sentence to be translated is matched with the translation rule template, the source language sentence to be translated is translated according to the steps 2-3.
The test phase flow is as follows:
step 1: loading a translation model;
step 2: constructing a translation rule template library, wherein the translation rule template library comprises a translation rule template in the form of a regular expression;
Step 3: identifying source language sentences to be translatedxRegular matching is carried out in a translation rule template library, and a translation rule template which accords with the regular matching is found;
step 4: the translation rule template is converted into a constraint hint sequence. The constraint prompt sequence can be split into two sections of source end constraint and target end constraint. And splicing the source end constraint of the constraint prompt sequence and the source language sentence to be translated to be used as source end input, and splicing the target end constraint of the constraint prompt sequence and the initial input sequence of the decoder to be used as target end initial input. The source end input is used as the input of the encoder, and the target end initial input is used as the input of the decoder;
step 5: outputting the translation result of the target language to obtain a sentence of the target languagey
As shown in fig. 4, fig. 4 is a process of translating using a constraint hint sequence of a translation rule template.
The invention provides a neural machine translation method, which aims to treat the situation that a source language and a target language have language expression rule constraint, and can effectively and conveniently constrain the result of machine translation without changing any neural machine translation model structure under the condition of presetting a translation rule template so that the language organization form of the translation meets the requirement of the translation rule template.
The machine translation method provided by the invention comprises the following steps: constructing a pseudo translation rule template from the parallel corpus according to the word alignment result; converting the translation rule template into a constraint prompt sequence; modifying the source end input and the target end initial input by using the constraint prompt sequence so as to add translation rule constraints in the translation input; in the training phase, constraint prompt training data and conventional translation training data are mixed for training. The invention can not only perform normal sentence translation under the unconstrained condition, but also realize effective constraint on the output translation sentence pattern by applying the translation rule template.
The neural machine translation device provided by the invention is described below, and the neural machine translation device described below and the neural machine translation method described above can be referred to correspondingly.
The invention also provides a neural machine translation device which is applied to a machine translation model, wherein the machine translation model comprises an encoder and a decoder, and is used for translating a source language sentence into a target language sentence.
Fig. 5 is a schematic structural diagram of a neural machine translation device provided by the invention. Referring to fig. 5, the neural machine translation device provided by the present invention includes:
The identifying module 510 is configured to identify a target translation rule template corresponding to a source language sentence to be translated, where the target translation rule template includes a first source end template, a first target end template, and a first source end variable fragment, the first source end template is constructed based on the source language sentence to be translated, the first target end template is constructed based on a sentence fragment of a target language, and the first source end variable fragment includes at least one sentence fragment in the source language sentence;
the first processing module 520 is configured to obtain an input of the encoder based on a first constraint prompt sequence and the source language sentence to be translated, where the first constraint prompt sequence is obtained by sequentially splicing the first source template, the first source variable fragment and the first target template;
a second processing module 530, configured to obtain an input of the decoder based on the first constraint hint sequence and an initial input sequence of the decoder, where the initial input sequence of the decoder is used to instruct the decoder to start decoding;
and a translation module 540, configured to obtain a translation result output by the machine translation model based on the input of the encoder and the input of the decoder.
The neural machine translation device provided by the invention obtains the target translation rule template by identifying the source language sentence to be translated, and converts the target translation rule template into the first constraint prompt sequence, so that the target translation rule template can be input into the model like a conventional source language sentence sequence without considering the priority problem of a plurality of translation rules; based on the first constraint prompt sequence, the language sentence to be translated and the initial input sequence of the decoder, the input of the encoder and the input of the decoder in the machine translation model are obtained, so that complete semantic information of the variable in the whole sentence can be considered when the variable is translated, and the translation is more accurate.
In some embodiments, the first processing module 520 is specifically configured to:
splicing the first source end template, the first source end variable fragment and the source language sentence to be translated to obtain the input of the encoder;
the second processing module 530 is specifically configured to:
and splicing the first target end template with the initial input sequence of the decoder to obtain the input of the decoder.
In some embodiments, the apparatus further comprises:
the training module is used for constructing a second translation rule template based on word alignment relations between source language sentences and target language sentences in the parallel corpus sample, wherein the second translation rule template comprises a second source end template, a second target end template and a second source end variable fragment;
Sequentially splicing the second source end template, the second source end variable fragment and the second target end template to obtain a second constraint prompt sequence;
based on the second constraint prompt sequence, splicing the second source template, the second source variable fragment and the source language sentence to obtain first training data, wherein the first training data is input by the encoder;
based on the second constraint prompt sequence, splicing the second target end template with the initial input sequence of the decoder to obtain second training data; the second training data is input to the decoder;
the machine translation model is trained based on the first training data and the second training data.
In some embodiments, the training module is specifically configured to:
determining Bernoulli distribution parameters corresponding to bilingual sentence pairs in a parallel corpus sample based on word alignment relations between source language sentences and target language sentences in the parallel corpus sample;
constructing the second translation rule template based on the double sentence pair under the condition that the Bernoulli distribution parameter corresponding to the double sentence pair exceeds a probability threshold;
And under the condition that the Bernoulli distribution parameters corresponding to the double sentence pairs do not exceed the probability threshold, determining the double sentence pairs as third training data, wherein the third training data is used for training the machine translation model.
In some embodiments, the training module is specifically configured to:
determining at least one sentence fragment in the continuous aligned sentence fragments as the second source variable fragment in the continuous aligned sentence fragments corresponding to the bilingual sentence pairs;
replacing the second source variable fragment in the sentence fragment corresponding to the source language sentence with a variable placeholder to obtain the second source template;
and replacing the target variable fragment with a variable placeholder to obtain the second target template, wherein the target variable fragment is a sentence fragment with word alignment relation with the second source variable fragment in the second target template.
In some embodiments, the training module is specifically configured to:
and adding a spacer between the second source end template and the second source end variable fragment, and adding a spacer between the second source end variable fragment and the second target end template to obtain the second constraint prompt sequence.
Fig. 6 illustrates a physical schematic diagram of an electronic device, as shown in fig. 6, which may include: processor 610, communication interface (Communications Interface) 620, memory 630, and communication bus 640, wherein processor 610, communication interface 620, and memory 630 communicate with each other via communication bus 640. Processor 610 may invoke logic instructions in memory 630 to perform a neural machine translation method, the method comprising:
identifying a target translation rule template corresponding to a source language sentence to be translated, wherein the target translation rule template comprises a first source end template, a first target end template and a first source end variable fragment, the first source end template is constructed based on the source language sentence to be translated, the first target end template is constructed based on a sentence fragment of a target language, and the first source end variable fragment comprises at least one sentence fragment in the source language sentence;
the input of the encoder is obtained based on a first constraint prompt sequence and the source language sentence to be translated, wherein the first constraint prompt sequence is obtained by sequentially splicing the first source end template, the first source end variable fragment and the first target end template;
Obtaining an input of the decoder based on the first constraint prompt sequence and an initial input sequence of the decoder, wherein the initial input sequence of the decoder is used for indicating the decoder to start decoding;
and obtaining a translation result output by the machine translation model based on the input of the encoder and the input of the decoder.
Further, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing the neural machine translation method provided by the methods described above, the method comprising:
identifying a target translation rule template corresponding to a source language sentence to be translated, wherein the target translation rule template comprises a first source end template, a first target end template and a first source end variable fragment, the first source end template is constructed based on the source language sentence to be translated, the first target end template is constructed based on a sentence fragment of a target language, and the first source end variable fragment comprises at least one sentence fragment in the source language sentence;
the input of the encoder is obtained based on a first constraint prompt sequence and the source language sentence to be translated, wherein the first constraint prompt sequence is obtained by sequentially splicing the first source end template, the first source end variable fragment and the first target end template;
obtaining an input of the decoder based on the first constraint prompt sequence and an initial input sequence of the decoder, wherein the initial input sequence of the decoder is used for indicating the decoder to start decoding;
And obtaining a translation result output by the machine translation model based on the input of the encoder and the input of the decoder.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the neural machine translation method provided by the above methods, the method comprising:
identifying a target translation rule template corresponding to a source language sentence to be translated, wherein the target translation rule template comprises a first source end template, a first target end template and a first source end variable fragment, the first source end template is constructed based on the source language sentence to be translated, the first target end template is constructed based on a sentence fragment of a target language, and the first source end variable fragment comprises at least one sentence fragment in the source language sentence;
the input of the encoder is obtained based on a first constraint prompt sequence and the source language sentence to be translated, wherein the first constraint prompt sequence is obtained by sequentially splicing the first source end template, the first source end variable fragment and the first target end template;
obtaining an input of the decoder based on the first constraint prompt sequence and an initial input sequence of the decoder, wherein the initial input sequence of the decoder is used for indicating the decoder to start decoding;
And obtaining a translation result output by the machine translation model based on the input of the encoder and the input of the decoder.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A neural machine translation method applied to a machine translation model including an encoder and a decoder, the machine translation model for translating a source language sentence into a target language sentence, the method comprising:
identifying a target translation rule template corresponding to a source language sentence to be translated, wherein the target translation rule template comprises a first source end template, a first target end template and a first source end variable fragment, the first source end template is constructed based on the source language sentence to be translated, the first target end template is constructed based on a sentence fragment of a target language, and the first source end variable fragment comprises at least one sentence fragment in the source language sentence;
The input of the encoder is obtained based on a first constraint prompt sequence and the source language sentence to be translated, wherein the first constraint prompt sequence is obtained by sequentially splicing the first source end template, the first source end variable fragment and the first target end template;
obtaining an input of the decoder based on the first constraint prompt sequence and an initial input sequence of the decoder, wherein the initial input sequence of the decoder is used for indicating the decoder to start decoding;
and obtaining a translation result output by the machine translation model based on the input of the encoder and the input of the decoder.
2. The neural machine translation method of claim 1, wherein the deriving the encoder input based on the first constrained hint sequence and the source language sentence to be translated comprises:
splicing the first source end template, the first source end variable fragment and the source language sentence to be translated to obtain the input of the encoder;
the obtaining the input of the decoder based on the first constraint prompt sequence and the initial input sequence of the decoder includes:
and splicing the first target end template with the initial input sequence of the decoder to obtain the input of the decoder.
3. The neural machine translation method of claim 1, wherein the machine translation model is trained by:
constructing a second translation rule template based on word alignment relations between source language sentences and target language sentences in the parallel corpus sample, wherein the second translation rule template comprises a second source end template, a second target end template and a second source end variable fragment;
sequentially splicing the second source end template, the second source end variable fragment and the second target end template to obtain a second constraint prompt sequence;
based on the second constraint prompt sequence, splicing the second source template, the second source variable fragment and the source language sentence to obtain first training data, wherein the first training data is input by the encoder;
based on the second constraint prompt sequence, splicing the second target end template with the initial input sequence of the decoder to obtain second training data; the second training data is input to the decoder;
the machine translation model is trained based on the first training data and the second training data.
4. The neural machine translation method of claim 3, wherein constructing a second translation rule template based on word alignment relationships between source language sentences and target language sentences in parallel corpus samples comprises:
Determining Bernoulli distribution parameters corresponding to bilingual sentence pairs in a parallel corpus sample based on word alignment relations between source language sentences and target language sentences in the parallel corpus sample;
constructing the second translation rule template based on the double sentence pair under the condition that the Bernoulli distribution parameter corresponding to the double sentence pair exceeds a probability threshold;
and under the condition that the Bernoulli distribution parameters corresponding to the double sentence pairs do not exceed the probability threshold, determining the double sentence pairs as third training data, wherein the third training data is used for training the machine translation model.
5. The neural machine translation method of claim 4, wherein said constructing said second translation rule template based on said bilingual sentence pairs comprises:
determining at least one sentence fragment in the continuous aligned sentence fragments as the second source variable fragment in the continuous aligned sentence fragments corresponding to the bilingual sentence pairs;
replacing the second source variable fragment in the sentence fragment corresponding to the source language sentence with a variable placeholder to obtain the second source template;
and replacing the target variable fragment with a variable placeholder to obtain the second target template, wherein the target variable fragment is a sentence fragment with word alignment relation with the second source variable fragment in the second target template.
6. The neural machine translation method according to claim 3, wherein the sequentially splicing the second source template, the second source variable fragment, and the second target template to obtain a second constraint prompt sequence includes:
and adding a spacer between the second source end template and the second source end variable fragment, and adding a spacer between the second source end variable fragment and the second target end template to obtain the second constraint prompt sequence.
7. A neural machine translation device for use in a machine translation model, the machine translation model including an encoder and a decoder, the machine translation model for translating a source language sentence into a target language sentence, the device comprising:
the system comprises an identification module, a translation module and a translation module, wherein the identification module is used for identifying a target translation rule template corresponding to a source language sentence to be translated, the target translation rule template comprises a first source end template, a first target end template and a first source end variable fragment, the first source end template is constructed based on the source language sentence to be translated, the first target end template is constructed based on a sentence fragment of a target language, and the first source end variable fragment comprises at least one sentence fragment in the source language sentence;
The first processing module is used for obtaining the input of the encoder based on a first constraint prompt sequence and the source language sentence to be translated, wherein the first constraint prompt sequence is obtained by sequentially splicing the first source end template, the first source end variable fragment and the first target end template;
the second processing module is used for obtaining the input of the decoder based on the first constraint prompt sequence and the initial input sequence of the decoder, wherein the initial input sequence of the decoder is used for indicating the decoder to start decoding;
and the translation module is used for obtaining a translation result output by the machine translation model based on the input of the encoder and the input of the decoder.
8. The neural machine translation device of claim 7, wherein the first processing module is specifically configured to:
splicing the first source end template, the first source end variable fragment and the source language sentence to be translated to obtain the input of the encoder;
the second processing module is specifically configured to:
and splicing the first target end template with the initial input sequence of the decoder to obtain the input of the decoder.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the neural machine translation method of any one of claims 1 to 6 when the program is executed by the processor.
10. A non-transitory computer readable storage medium, having stored thereon a computer program, which when executed by a processor, implements the neural machine translation method of any of claims 1 to 6.
CN202311304326.9A 2023-10-10 2023-10-10 Neural machine translation method, device, electronic equipment and medium Active CN117034968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311304326.9A CN117034968B (en) 2023-10-10 2023-10-10 Neural machine translation method, device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311304326.9A CN117034968B (en) 2023-10-10 2023-10-10 Neural machine translation method, device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN117034968A true CN117034968A (en) 2023-11-10
CN117034968B CN117034968B (en) 2024-02-02

Family

ID=88641680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311304326.9A Active CN117034968B (en) 2023-10-10 2023-10-10 Neural machine translation method, device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN117034968B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210019373A1 (en) * 2019-07-15 2021-01-21 Google Llc Automatic post-editing model for neural machine translation
CN113408307A (en) * 2021-07-14 2021-09-17 北京理工大学 Neural machine translation method based on translation template
CN113515955A (en) * 2021-04-26 2021-10-19 太极计算机股份有限公司 Semantic understanding-based online translation system and method from text sequence to instruction sequence
CN113657123A (en) * 2021-07-14 2021-11-16 内蒙古工业大学 Mongolian aspect level emotion analysis method based on target template guidance and relation head coding
CN114692655A (en) * 2020-12-31 2022-07-01 北京金山数字娱乐科技有限公司 Translation system and text translation, download, quality check and editing method
WO2023005763A1 (en) * 2021-07-29 2023-02-02 北京有竹居网络技术有限公司 Information processing method and apparatus, and electronic device
CN116595999A (en) * 2023-07-17 2023-08-15 深圳须弥云图空间科技有限公司 Machine translation model training method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210019373A1 (en) * 2019-07-15 2021-01-21 Google Llc Automatic post-editing model for neural machine translation
CN114692655A (en) * 2020-12-31 2022-07-01 北京金山数字娱乐科技有限公司 Translation system and text translation, download, quality check and editing method
CN113515955A (en) * 2021-04-26 2021-10-19 太极计算机股份有限公司 Semantic understanding-based online translation system and method from text sequence to instruction sequence
CN113408307A (en) * 2021-07-14 2021-09-17 北京理工大学 Neural machine translation method based on translation template
CN113657123A (en) * 2021-07-14 2021-11-16 内蒙古工业大学 Mongolian aspect level emotion analysis method based on target template guidance and relation head coding
WO2023005763A1 (en) * 2021-07-29 2023-02-02 北京有竹居网络技术有限公司 Information processing method and apparatus, and electronic device
CN116595999A (en) * 2023-07-17 2023-08-15 深圳须弥云图空间科技有限公司 Machine translation model training method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WEI SHANG 等: "Guiding Neural Machine Translation with Retrieved Translation Template", 2021 INTERNATIONAL JOINT CONFERENCE ON NEURAL NETWORKS (IJCNN) *
詹聪 等: "改进的模板驱动的神经机器翻译", 微电子学与计算机 *

Also Published As

Publication number Publication date
CN117034968B (en) 2024-02-02

Similar Documents

Publication Publication Date Title
KR102401942B1 (en) Method and apparatus for evaluating translation quality
CN109213851B (en) Cross-language migration method for spoken language understanding in dialog system
CN111599340A (en) Polyphone pronunciation prediction method and device and computer readable storage medium
JP7335300B2 (en) Knowledge pre-trained model training method, apparatus and electronic equipment
CN112287696B (en) Post-translation editing method and device, electronic equipment and storage medium
WO2023051148A1 (en) Method and apparatus for multilingual processing
CN113743101B (en) Text error correction method, apparatus, electronic device and computer storage medium
CN111967260A (en) Polyphone processing method and device and model training method and device
CN113743117A (en) Method and device for entity marking
Zhang et al. Design and implementation of Chinese Common Braille translation system integrating Braille word segmentation and concatenation rules
CN112380882B (en) Mongolian Chinese neural machine translation method with error correction function
KR20210125449A (en) Method for industry text increment, apparatus thereof, and computer program stored in medium
CN113268989A (en) Polyphone processing method and device
CN109657244B (en) English long sentence automatic segmentation method and system
US20230153550A1 (en) Machine Translation Method and Apparatus, Device and Storage Medium
CN117034968B (en) Neural machine translation method, device, electronic equipment and medium
Shi et al. Adding Visual Information to Improve Multimodal Machine Translation for Low‐Resource Language
CN115357710A (en) Training method and device for table description text generation model and electronic equipment
CN114818728A (en) Text style migration model training and text style migration method and device
CN115130481A (en) Model training method, model training device, model translation device, model training equipment and model translation equipment, and storage medium
CN107423293A (en) The method and apparatus of data translation
CN113327579A (en) Speech synthesis method, speech synthesis device, storage medium and electronic equipment
CN113591498A (en) Translation processing method, device, equipment and medium
CN113160793A (en) Speech synthesis method, device, equipment and storage medium based on low resource language
Chen et al. Fast OOV words incorporation using structured word embeddings for neural network language model

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
GR01 Patent grant
GR01 Patent grant