P
US11520997B2ActiveUtilityPatentIndex 41

Computing device and method for generating machine translation model and machine-translation device

Assignee: UNIV NAT CENTRALPriority: Nov 25, 2019Filed: Nov 29, 2019Granted: Dec 6, 2022
Est. expiryNov 25, 2039(~13.4 yrs left)· nominal 20-yr term from priority
Inventors:WANG JIA-CHINGLIN YI-XING
G06N 3/047G06N 3/045G06F 40/44G06F 40/58G06N 20/00G06N 3/08G06F 40/242G06N 3/094G06N 3/0455G06N 3/0475
41
PatentIndex Score
0
Cited by
6
References
16
Claims

Abstract

A device and a method for generating a machine translation model and a machine translation device are disclosed. The device inputs a source training sentence of a source language and a dictionary data to a generator network so that the generator network outputs a target training sentence of a target language according to the source training sentence and the dictionary data. Then, the device inputs the target training sentence and a correct translation of the source training sentence to a discriminator network so as to calculate an error between the target training sentence and the correct translation according to the output of the discriminator network, and trains the generator network and the discriminator network respectively. The trained generator network is the machine translation model.

Claims

exact text as granted — not AI-modified
The invention claimed is: 
     
       1. A computing device for generating a machine-translation model, comprising:
 a storage, configured to store a dictionary data and a generative adversarial network (GAN), wherein the dictionary data comprises a correspondence between a plurality of words of a source language and a plurality of words of a target language, and the GAN comprises a generator network and a discriminator network; and 
 a processor, being electrically connected with the storage, and being configured to:
 input a source training sentence of the source language and the dictionary data to the generator network, such that the generator network output a target training sentence of the target language according to the source training language and the dictionary data; 
 input the target training sentence and a correct translation of the source training sentence to the discriminator network to calculate an error between the target training sentence and the correct translation according to an output of the discriminator network; and 
 train the generator network and the discriminator network respectively according to the error, wherein the trained generator network is the machine-translation model. 
 
 
     
     
       2. The computing device of  claim 1 , wherein the generator network comprises a Transformer model, and in the generator network, the processor is further configured to:
 generate a training word sequence of the target language according to the source training sentence and the dictionary data; 
 generate a plurality of training word-embedding vectors of the target language according to the training word sequence; and 
 input the training word-embedding vectors to the Transformer model to generate the target training sentence via the Transformer model. 
 
     
     
       3. The computing device of  claim 1 , wherein the discriminator network comprises a bidirectional encoder representation from Transformer (BERT) model, and in the discriminator network, the processor is further configured to:
 generate a plurality of target training word-embedding vectors based on the target training sentence; and 
 input the target training word-embedding vectors to the BERT model, so as to generate a predicted true/false value, a predicted statistical score and a predicted sentence structure. 
 
     
     
       4. The computing device of  claim 2 , wherein the generator network further comprises another BERT model, and in the generator network, the processor is further configured to:
 generate a plurality of word-embedding vectors of the source language based on the source training sentence; 
 input the word-embedding vectors of the source language to the other BERT model so as to obtain a training sentence-embedding vector; and 
 input the training sentence-embedding vector to the Transformer model so as to generate the target training sentence. 
 
     
     
       5. The computing device of  claim 3 , wherein the processor is further configured to:
 calculate a correct statistical score according to the correct translation, wherein the correct statistical score is a bilingual evaluation understudy (BLEU) score or an F1 score; 
 analyze the correct translation via a natural language toolkit (NLTK) so as to obtain a correct sentence structure; 
 calculate an error of true/false value based on the predicted true/false value and the source training sentence; 
 calculate an error of statistical score according to the predicted statistical score and the correct statistical score; and 
 calculate an error of sentence structure according to the predicted sentence structure and the correct sentence structure; and 
 wherein the error between the target training sentence and the correct translation at least comprises the error of true/false value, the error of statistical score, and the error of sentence structure. 
 
     
     
       6. A method for a computing device to generate a machine-translation model, wherein the computing device stores a dictionary data and a generative adversarial network (GAN), the dictionary data comprises a correspondence between a plurality of words of a source language and a plurality of words of a target language, and the GAN comprises a generator network and a discriminator network, the method comprising:
 inputting, by the computing device, a source training sentence of the source language and the dictionary data to the generator network, such that the generator network output a target training sentence of the target language according to the source training language and the dictionary data; 
 inputting, by the computing device, the target training sentence and a correct translation of the source training sentence to the discriminator network to calculate an error between the target training sentence and the correct translation according to an output of the discriminator network; and 
 training, by the computing device, the generator network and the discriminator network respectively according to the error, wherein the trained generator network is the machine-translation model. 
 
     
     
       7. The method of  claim 6 , wherein the generator network comprises a Transformer model, and the method further comprises:
 generating, by the computing device, a training word sequence of the target language according to the source training sentence and the dictionary data; 
 generating, by the computing device, a plurality of training word-embedding vectors of the target language according to the training word sequence; and 
 inputting, by the computing device, the training word-embedding vectors to the Transformer model to generate the target training sentence via the Transformer model. 
 
     
     
       8. The method of  claim 6 , wherein the discriminator network comprises a bidirectional encoder representation from Transformer (BERT) model, and the method further comprises:
 generating, by the computing device, a plurality of target training word-embedding vectors based on the target training sentence; and 
 inputting, by the computing device, the target training word-embedding vectors to the BERT model, so as to generate a predicted true/false value, a predicted statistical score and a predicted sentence structure. 
 
     
     
       9. The method of  claim 7 , wherein the generator network further comprises another BERT model, and the method further comprises:
 generating, by the computing device, a plurality of word-embedding vectors of the source language based on the source training sentence; 
 inputting, by the computing device, the word-embedding vectors of the source language to the other BERT model so as to obtain a training sentence-embedding vector; and 
 inputting, by the computing device, the training sentence-embedding vector to the Transformer model so as to generate the target training sentence. 
 
     
     
       10. The method of  claim 8 , further comprising:
 calculating, by the computing device, a correct statistical score according to the correct translation, wherein the correct statistical score is a bilingual evaluation understudy (BLEU) score or an F1 score; 
 analyzing, by the computing device, the correct translation via a natural language toolkit (NLTK) so as to obtain a correct sentence structure; 
 calculating, by the computing device, an error of true/false value based on the predicted true/false value and the source training sentence; 
 calculating, by the computing device, an error of statistical score according to the predicted statistical score and the correct statistical score; and 
 calculating, by the computing device, an error of sentence structure according to the predicted sentence structure and the correct sentence structure; and 
 wherein the error between the target training sentence and the correct translation at least comprises the error of true/false value, the error of statistical score, and the error of sentence structure. 
 
     
     
       11. A machine-translation device, comprising:
 a storage, configured to store a dictionary data, wherein the dictionary data comprises a correspondence between a plurality of words of a source language and a plurality of words of a target language; and 
 a processor, being electrically connected with the storage, and being configured to:
 train a generative adversarial network (GAN) to generate a machine-translation model, 
 generate a word sequence of the target language according to a source sentence of the source language and the dictionary data; 
 generate a plurality of word-embedding vectors of the target language based on the word sequence; and 
 input the word-embedding vectors of the target language to a Transformer model in the machine-translation model, so as to obtain a target sentence of the target language; 
 wherein the GAN comprising:
 a generator network comprising the Transformer model, wherein the processor is configured to generate a target training sentence of the target language according to a source training sentence of the source language and the dictionary data; and 
 a discriminator network, wherein the processor is configured to determine a source of the target training sentence; and 
 
 wherein the processor is further configured to:
 input the target training sentence to the discriminator network to calculate an error between the target training sentence and a correct translation of the source training sentence according to an output of the discriminator network; and 
 train the generator network and the discriminator network respectively according to the error, wherein the trained generator network is the machine-translation model. 
 
 
 
     
     
       12. The machine-translation device of  claim 11 , wherein the processor is further configured to:
 generate a plurality of word-embedding vectors of the source language based on the word-embedding vectors; 
 input the word-embedding vectors of the source language to a bidirectional encoder representation from Transformer (BERT) model, so as to obtain a sentence-embedding vector; and 
 input the sentence embedding vector to the Transformer model to generate the target sentence. 
 
     
     
       13. The machine-translation device of  claim 11 , wherein in the generator network, the processor is further configured to:
 generate a training word sequence of the target language according to the source training sentence and the dictionary data; 
 generate a plurality of training word-embedding vectors of the target language according to the training word sequence; and 
 input the training word-embedding vectors to the Transformer model to generate the target training sentence via the Transformer model. 
 
     
     
       14. The machine-translation device of  claim 11 , wherein the generator network further comprises another BERT model, and in the generator network, the processor is further configured to:
 generate a plurality of word-embedding vectors of the source language based on the source training sentence; 
 input the word-embedding vectors of the source language to the other BERT model so as to obtain a training sentence-embedding vector; and 
 input the training sentence-embedding vector to the Transformer model so as to generate the target training sentence. 
 
     
     
       15. The machine-translation device of  claim 11 , wherein the discriminator network comprises another BERT model, and in the discriminator network, the processor is further configured to:
 generate a plurality of target training word-embedding vectors based on the target training sentence; and
 input the target training word-embedding vectors to the other BERT model, so as to generate a predicted true/false value, a predicted statistical score and a predicted sentence structure. 
 
 
     
     
       16. The machine-translation device of  claim 14 , wherein the processor is further configured to:
 calculate a correct statistical score according to the correct translation, wherein the correct statistical score is a bilingual evaluation understudy (BLEU) score or an F1 score; 
 analyze the correct translation via a natural language toolkit (NLTK) so as to obtain a correct sentence structure; 
 calculate an error of true/false value based on the predicted true/false value and the source training sentence; 
 calculate an error of statistical score according to the predicted statistical score and the correct statistical score; and 
 calculate an error of sentence structure according to the predicted sentence structure and the correct sentence structure; and 
 wherein the error between the target training sentence and the correct translation at least comprises the error of true/false value, the error of statistical score, and the error of sentence structure.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.