Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Neural-Machine-Translation

This repo serves as building of machine translation model using Seq-to-Seq model in Pytorch.

Translation: German to English
Dataset: Multi30k containing English and German captions for images from Flickr
Tokenization: sentencepiece
Prediction: Greedy

Baseline Model

LSTM based Seq-to-Seq model

Encoder: Bidirectional LSTM with each direction having 2 layers
Decoder: 2 layer LSTM
Accuracy: 50.50%
Bleu Score: 18.76

Baseline model sample predictions:

Screenshot from 2023-08-01 15-46-25

Seq-to-Seq model with attention

Neural Machine Translation by Jointly Learning to Align and Translate

Encoder: Bidirectional LSTM with each direction having 2 layers
Decoder: 2 layer LSTM with attention mechanism
Accuracy: 67.70%
Bleu Score: 38.45

Attention model sample predictions:

Screenshot from 2023-08-01 15-50-31

Adding attention mechanism to the decoder gave a significant increase in accuracy and bleu score, the translations were much clear than the baseline model.

About

Building German to English Machine Translation using Attention Mechanism.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages