Code Monkey home page Code Monkey logo

chainer-attention-nmt's Introduction

Chainer Implementation of Attentional SEQ2SEQ Model

Chainer-based implementation of Attention-based seq2seq model.

See "Neural Machine Translation by Jointly Learning to Align and Translate", Dzmitry Bahdanau, Kyunghyun Cho, Yoshua Bengio, arxiv 2014.

This repository is partly derived from this repository and Chainer's official seq2seq example.

Development Environment

  • Ubuntu 16.04
  • Python 3.5.2
  • Chainer 3.1.0
  • numpy 1.13.3
  • cupy 2.1.0
  • nltk
  • progressbar
  • and their dependencies

How to Run

First you need to prepare parallel corpus. Download 10^9 French-English corpus from WMT15 website.

http://www.statmt.org/wmt15/translation-task.html

$ sh download_wmt.sh

Now you can get six files:

  • Source sentence file: giga-fren.preprocess.en
  • Source vocabulary file: vocab.en
  • Target sentence file: giga-fren.preprocess.fr
  • Source vocabulary file: vocab.fr
  • Source sentence file (validation): newstest2013.preprocess.en
  • Target sentence file (validation): newstest2013.preprocess.fr

Then, let's start training.

$ python train.py giga-fren.preprocess.en giga-fren.preprocess.fr vocab.en vocab.fr --validation-source newstest2013.preprocess.en --validation-target newstest2013.preprocess.fr

See command line help for other options.

chainer-attention-nmt's People

Contributors

hkiyomaru avatar knok avatar

Watchers

arton avatar yagi_ avatar James Cloos 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.