IP Library › Granted Patent US 11,520,997
Granted Patent B2
US 11,520,997 · App. 16/699,477 · Granted Dec 6, 2022

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

Inventors: Jia-Ching Wang (Taoyuan, TW); Yi-Xing Lin (Taoyuan, TW)
Assignee: National Central University
G06F40/58G06F40/242G06N20/00
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,520,997
App. No.
16/699,477
Granted
Dec 6, 2022
Kind
B2
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 (81)

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.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 29, 2019
From: WANG, JIA-CHING; LIN, YI-XING
To: NATIONAL CENTRAL UNIVERSITY
Reel/Frame 051138/0625 →
Priority Claims (1)
TW 108142757 · Nov 25, 2019 · national
Continuity (1)
Related Publication 20210157991A1 · May 27, 2021