GithubHelp home page GithubHelp logo

jiezhanggt / cdalign Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ghchen18/cdalign

0.0 1.0 0.0 465 KB

Code for AAAI 2021 paper "Lexically Constrained Neural Machine Translation with Explicit Alignment Guidance"

License: MIT License

Shell 0.65% C++ 0.89% Python 96.10% Cuda 1.76% Cython 0.60%

cdalign's Introduction

Code for AAAI 2021 paper "Lexically Constrained Neural Machine Translation with Explicit Alignment Guidance". [Paper]

Install and Data preprocess

The code is implemented on fairseq v0.9.0, follow the same steps to install and prepare the processed fairseq dataset with script here. You may need to process other datasets similarly. The python package fastbpe is also needed.

git clone https://github.com/ghchen18/cdalign.git
cd cdalign
pip install --editable ./

Step 1: Train vanilla transformer

See scripts/run_train.sh

Step 2: Extract alignment using Att-Input method and process alignment data

See scripts/extract_alignment.sh

Step 3: Train with EAM-Output method

See scripts/run_train.sh

Step 4: Test on lexically constrained NMT task

See scripts/run_test.sh

Citation

@inproceedings{chen2021lexically,
  title={Lexically Constrained Neural Machine Translation with Explicit Alignment Guidance},
  author={Guanhua, Chen and Yun, Chen and Victor O.K., Li},
  booktitle = {Proceedings of AAAI},
  year      = {2021},
  pages  = {12630--12638},
  volume={35},
  number={14},
}

cdalign's People

Contributors

ghchen18 avatar

Watchers

 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.