This is a SMALL neural machine translation application that can translate from Enlgish to Russian.
To solve the problem of neural machine translation, I used seq2seq recurrent neural network architecture and pre-trained word embeddings(GloVe). This project implements everything from downloading / preparing data to launching an application on a user's sentence. The network has been trained in 20,000 pairs of phrases over 30 epochs.
The purpose of this project is not to make as optimized and computationally effective translation application as possible.
The main goal of the project is to get some experience in building translation-applications and understand seq2seq architecure of recurrent neural network better.
Learning and having FUN!
-
- This file contains code for data preparation, getting rid of punctuation etc... [
-
- This file contains code for reducing and splitting main dataset.
-
- This file contains code for loading prepared data, loading pre-trained word embeddings, preparing embedding matrix, compiling and training a model. You can choose the number of epochs yourself. Mine was trained only within 30 epochs!
-
- This file containcs code for preparing user's sentence and running our trained model on it.
-
- This folder contains my pre-trained network.
-
- This folder contains the data I've trained my seq2seq on and compressed Pickle files you need to run predict.py.
-
- This folder contains a HTML file that redirects to the download site for pre-trained embeddings.
git clone https://github.com/mishazakharov/NMT
cd NMT
python3 prepare.py
In case you want to train network yourself:
python3 model.py
Before you run any files you need to do:
./NMT/glove/glove.html
unzip ./NMT/data/data.zip
If you want to work on this together or just feeling social, feel free to contact me here. And I am also available at this([email protected]) and this([email protected]) email addresses! Feel free to give me any advice. 👍