Skip to content

This is a simple, poorly trained neural machine translation application.

Notifications You must be signed in to change notification settings

mishazakharov/NMT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural Machine Translation

About

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.

image

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!

Table of Content

  1. prepare.py

    • This file contains code for data preparation, getting rid of punctuation etc... [
  2. split.py

    • This file contains code for reducing and splitting main dataset.
  3. model.py

    • 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!
  4. predict.py

    • This file containcs code for preparing user's sentence and running our trained model on it.
  5. models

    • This folder contains my pre-trained network.
  6. data

    • This folder contains the data I've trained my seq2seq on and compressed Pickle files you need to run predict.py.
  7. glove

    • This folder contains a HTML file that redirects to the download site for pre-trained embeddings.

Seq2Seq

  1. General ideas about architecture. image

  2. Links that can help you figure it out and which I used: 1,2,3,4,5,6

Installation

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

Contact

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(misha_zakharov96@mail.ru) and this(vorahkazmisha@gmail.com) email addresses! Feel free to give me any advice. 👍