Skip to content

Trained sequence-to-sequence models for Spanish-to-English translation.

Notifications You must be signed in to change notification settings

XiongjieDai/Neural-Machine-Translation

Repository files navigation

Neural-Machine-Translation

In this project, we performed machine translation using two deep learning approaches: a Recurrent Neural Network (RNN) and a Transformer.

Here are some helpful links:

  1. Sequence to Sequence Learning with Neural Networks
  2. NLP From Scratch: Translation with a Sequence to Sequence Network and Attention (Pytorch tutorials)

Recurrent Neural Network (RNN)

Here are some helpful links:

  1. Neural Machine Translation by Jointly Learning to Align and Translate
  2. Explanation of LSTM's & GRU's
  3. Different types of Attention in Neural Networks
  4. Attention and its Different Forms

Model Generation examples

Source sentence: tom no esta preocupado . Target sentence: tom isn t worried . Predicted sentence: tom isn t worried .

Source sentence: hemos estado aqui antes . Target sentence: we ve been here before . Predicted sentence: we ve been here before .

Source sentence: abrelo , por favor . Target sentence: please open it . Predicted sentence: please come in .

Source sentence: no me gusta ninguno de ellos . Target sentence: i like none of them . Predicted sentence: i don t like any of them .

Source sentence: lo hice por tom . Target sentence: i did it for tom . Predicted sentence: i did that for tom .

Evaluation

Loss: 1.8524. BLEU 1-gram: 0.297967. BLEU 2-gram: 0.083336. BLEU 3-gram: 0.060941. BLEU 4-gram: 0.057988.

Read more about Bleu Score at:

  1. https://en.wikipedia.org/wiki/BLEU
  2. https://www.aclweb.org/anthology/P02-1040.pdf

Transformer

Here are some helpful links:

  1. Attention Is All You Need
  2. The Illustrated Transformer
  3. Transformers From Scratch

Model Generation examples

Source sentence: probaremos a hacerlo otra vez . Target sentence: we ll try again . Predicted sentence: we ll try again .

Source sentence: dejemos de perder tiempo . Target sentence: let s stop wasting time . Predicted sentence: let s stop wasting time .

Source sentence: lamento lo que paso . Target sentence: i regret what happened . Predicted sentence: i m sorry than happened .

Source sentence: no puedo confiar en vosotros . Target sentence: i can t trust you . Predicted sentence: i can t trust you .

Source sentence: solo era un sueno . Target sentence: it was only a dream . Predicted sentence: it was just a dream .

Evaluation

Loss: 1.3676. BLEU 1-gram: 0.299091. BLEU 2-gram: 0.084177. BLEU 3-gram: 0.061698. BLEU 4-gram: 0.058867.

About

Trained sequence-to-sequence models for Spanish-to-English translation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages