-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e0f209
commit f8c3692
Showing
3 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Multilingual Neural Machine Translation with Soft Decoupled Encoding | ||
This is the code we used in our paper | ||
>[Multilingual Neural Machine Translation with Soft Decoupled Encoding](https://arxiv.org/pdf/1902.03499.pdf) | ||
>Xinyi Wang, Hieu Pham, Philip Arthur, Graham Neubig | ||
|
||
## Requirements | ||
|
||
Python 3.6, PyTorch 0.4.1 | ||
|
||
|
||
All the scripts for experiments in the paper can be created from the templates under scripts/template/ | ||
|
||
## Data Processing | ||
|
||
The data we use is [multilingual TED corpus](https://github.com/neulab/word-embeddings-for-nmt) by Qi et al. | ||
|
||
We provide preprocessed version of the data, which you can get from: | ||
If you are interested int the details of data processing, you can take a look at the script ``make-eng.sh`` and ``make-data.sh``. | ||
|
||
## Training: | ||
The template name for the following methods are: | ||
1. SDE: bi-semb-bq-o32000 | ||
2. subword: bi-sw-32000 | ||
2. subword-joint: bi-sw-joint-32000 | ||
3. word: bi-w-64000 | ||
|
||
To make the main experiment scripts for alll 4 languages tested in the paper, simply call | ||
``bash make-cfg.sh`` | ||
|
||
## Decoding: | ||
To make decode scripts, simply use the file make-trans.py. Change the name of the directory where the experiment outputs are stored if you modify the template scripts during training. Otherwise it should just work by calling: | ||
``python make-trans.py`` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters