e-bug / pascal

[ACL 2020] Code and data for our paper "Enhancing Machine Translation with Dependency-Aware Self-Attention"
https://www.aclweb.org/anthology/2020.acl-main.147/
MIT License
22 stars 10 forks source link

Enhancing Machine Translation with Dependency-Aware Self-Attention

This is the implementation of the approaches described in the paper:

Emanuele Bugliarello and Naoaki Okazaki. Enhancing Machine Translation with Dependency-Aware Self-Attention. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, July 2020.

We provide the code for reproducing our results, as well as translation outputs of each model.

Requirements

You can clone this repository with submodules included issuing: git clone --recurse-submodules git@github.com:e-bug/pascal

The requirements can be installed by setting up a conda environment:
conda env create -f environment.yml followed by source activate pascal

Data Preparation

The pre-processing steps for each model in each data set can be found in the corresponding experiments/ folder, and rely on our code (scripts/) as well as on third-party software (tools/).

Training

Scripts for training each model are provided in the corresponding data set folder in experiments/ (e.g., experiments/wmt16en2de/transformer/train.sh).

Note that we trained our models on a SGE cluster. To run our training experiments, submit (qsub) the corresponding train.sge file for a given experiment. It calls the train.sh file associated in its directory.

Evaluation

Similarly, you can use the corresponding eval.sh and eval.sge files to evaluate a model.

Description of this repository

License

This work is licensed under the MIT license. See LICENSE for details. Third-party software and data sets are subject to their respective licenses.
If you find our code/models or ideas useful in your research, please consider citing the paper:

@inproceedings{bugliarello-okazaki-2020-enhancing,
    title = "Enhancing Machine Translation with Dependency-Aware Self-Attention",
    author = "Bugliarello, Emanuele  and
      Okazaki, Naoaki",
    booktitle = "Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics",
    month = jul,
    year = "2020",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/2020.acl-main.147",
    pages = "1618--1627",
}