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.
- Python version : 3.7
- Tensorflow version : 2.2
- Packages Used : numpy,pandas,seaborn,sklearn,tensorflow,nltk
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.

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.

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.
- More examples are available in the notebook!