GithubHelp home page GithubHelp logo

j0ma / lmm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from d-ataman/lmm

0.0 1.0 0.0 2.47 MB

License: MIT License

Dockerfile 0.01% Python 39.19% Shell 1.13% Perl 47.27% Makefile 0.01% PHP 5.17% JavaScript 6.16% CSS 0.10% AngelScript 0.02% Smalltalk 0.08% Emacs Lisp 0.70% OCaml 0.02% NewLisp 0.07% Ruby 0.07% Slash 0.01% SystemVerilog 0.01%

lmm's Introduction

A Latent Morphology Model for Open-Vocabulary Neural Machine Translation (fork)

My own fork of Latent Morphology Model for Open-Vocabulary Neural Machine Translation by D. Ataman

Steps to reproduce

  1. Install moses
  2. Install python dependencies
  3. Run scripts/download-and-prepare-data.sh

Notes

  • On AWS, pytorch==1.4.0, torchtext=0.2.1 gets train.py to line 240

  • Using subword-nmt from Sennrich's group for the BPE learning

  • Going to use moses for tokenization/truecasing

    • Always make sure $MOSES_SCRIPTS is set to point to the folder containing Moses' perl scripts
  • BPE for English can be learned

    • a) Separately for each EN-TGT pair
    • b) Jointly from all EN training data
  • Make sure to set the $LMM_REPO environment variable to point to the repository

    • There is now a check for this in preprocess.sh
  • Make sure to use python 3.6 or earlier since 3.7 gives an odd error message about StopIteration

    • Alternatively you can go dig in the source code but it's probably easier to just
  • There seems to be two versions of Samplers.py

    • onmt.modules.Samplers and onmt.Samplers
    • The former seems to be commented out

Todo

  • host dataset somewhere
  • write download-data.sh to download and extract TED xml
  • write tokenization/lowercasing/truecasing/BPE scripts
    • tokenization of src/tgt
    • truecasing model for each lang pair
    • bpe of english target side
  • preprocess corpus into correct format
    • TED dataset
    • IWSLT dataset
  • [] get examples/train.sh working
  • [] get examples/translate.sh working

This software implements the Neural Machine Translation model based on Hierchical Character-based Decoding using Variational Inference.

Options

## Hiearchical Decoder with Compositional Word Embeddings and Character-level Generation with Variational Inference

To activate the character-level decoder, select

-tgt_data_type characters in the settings of preprocess.py and translate.py

and

-decoder_type charrnn and -tgt_data_type characters in train.py

The feature dimensions are hardcoded to 100 for the lemma and 10 for inflectional feature vectors, you can change this depending on your language or data size.

Further information

For information about how to install and use OpenNMT-py: Full Documentation

Citation

If you use this software, please cite: @article{lmm, author = {Duygu Ataman and Wilker Aziz and Alexandra Birch}, title = {A Latent Morphology Model for Open-Vocabulary Neural Machine Translation}, booktitle = {Under Review as Conference Paper at ICLR}, year = {2019}, }

lmm's People

Contributors

j0ma avatar d-ataman avatar

Watchers

James Cloos 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.