Skip to content

KiranJ2000/MachineTranslation_using_Encoder_Decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Neural Machine Translation(ENG - ITA)

The objective of this project is to convert an English sentence to it's Italian counterpart using a Neural Machine Translation system. I will implement this task by building a simple encoder-decoder model.

Resources Used

  • Python version : 3.7
  • Tensorflow version : 2.2
  • Packages Used : numpy,pandas,seaborn,sklearn,tensorflow,nltk

Exploratory Data Analysis

I did EDA to check the distribution of the data based on word count. To even things out and also because of memory reasons , i removed sentences having word count greater than 13. Machine translation pic

Model Building

This project was built using a simple Encoder-Decoder model. Encoder reads the input sequence and summarizes the information in something called as the internal state vectors (in case of LSTM these are called as the hidden state and cell state vectors). We discard the outputs of the encoder and only preserve the internal states. Decoder is an LSTM whose initial states are initialized to the final states of the Encoder LSTM. Using these initial states, decoder starts generating the output sequence.

To simplify things, here is a small image. NMT

Model performance

I ran the model for only 40 epochs due to the fact that Google Colab only provides 12GB of RAM. More than 40 epochs would result in Google Colab crashing.
Even though the model ran for only 40 epochs , It produced pretty good results!.
Here are a few examples.

example

Capture

gol

  • More examples are available in the notebook!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors