Coder Social home page Coder Social logo

shikhar-s / neural-machine-translation Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 94.79 MB

English-Hindi translation with attention. WIP

Python 40.55% Jupyter Notebook 59.45%
pytorch seq2seq sequence-to-sequence torchtext pytorch-implementation encoder-decoder neural-machine-translation attention attention-seq2seq english-hindi-translation

neural-machine-translation's Introduction

Neural Machine Translation

Pytorch implementations of Neural Machine Translation by Jointly Learning to Align and Translate for English to Hindi translation on IITB En-Hi parallel corpus.

Prerequisites

  • numpy==1.17.2
  • torch==1.2.0
  • torchtext==0.5.0
  • tqdm==4.44.1
  • indic-nlp-library==0.6
  • Python 3.6+

Usage

Install prerequisites with:

pip3 install -r requirements.txt

and download and extract IITB En-Hi parallel corpus in Data folder.

To train model :

python3 main.py  

To train with different data use `!`!` as separator for source and target language data paths. For example:

python3 main.py --training_data './Data/dev_test/test.en`!`!`./Data/dev_test/test.hi' --validation_data './Data/dev_test/dev.en`!`!`./Data/dev_test/dev.hi' 

To run in inference mode, provide trained model and dictionary paths. For example:

python3 main.py --mode infer --load_model_path './trained_models/test_model.pt' --load_dic_path './trained_models/test_dic.pkl'

More configurations can be found here.

Reference

Author

Shikhar / @Shikhar

neural-machine-translation's People

Contributors

shikhar-s avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.