Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of the paper "Jointly Learning to Align & Translate with Transformer" #1615

Merged
merged 21 commits into from Nov 22, 2019

Conversation

Zenglinxiao
Copy link
Contributor

Implementation of the paper https://arxiv.org/abs/1909.02074 using OpenNMT-py.
Original implementation disponible at fairseq.
This PR enables Transformer based models to jointly output word alignment alongside its translation.
The quality of output alignment could be further improved by joint training models on translation & alignment providing align labels produced by statistic tools such as fastalign or giza.

Copy link
Member

@francoishernandez francoishernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick first pass of review.

onmt/decoders/transformer.py Outdated Show resolved Hide resolved
onmt/decoders/transformer.py Show resolved Hide resolved
onmt/inputters/inputter.py Outdated Show resolved Hide resolved
onmt/opts.py Show resolved Hide resolved
onmt/opts.py Show resolved Hide resolved
onmt/translate/translator.py Outdated Show resolved Hide resolved
onmt/utils/loss.py Outdated Show resolved Hide resolved
onmt/utils/loss.py Outdated Show resolved Hide resolved
onmt/utils/misc.py Show resolved Hide resolved
onmt/utils/parse.py Outdated Show resolved Hide resolved
@francoishernandez
Copy link
Member

We need to fix the audio codepath to handle the new options (see Travis unit test logs).
Also, it might be good to have an entry in the FAQ about this: what's the point, how to use (preprocess, train, translate sample commands and data format example).

Copy link
Member

@francoishernandez francoishernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few additional comments.

onmt/bin/preprocess.py Outdated Show resolved Hide resolved
onmt/bin/server.py Show resolved Hide resolved
onmt/decoders/transformer.py Outdated Show resolved Hide resolved
onmt/decoders/transformer.py Show resolved Hide resolved
onmt/decoders/transformer.py Outdated Show resolved Hide resolved
onmt/decoders/transformer.py Show resolved Hide resolved
onmt/translate/translation_server.py Show resolved Hide resolved
onmt/translate/translator.py Show resolved Hide resolved
onmt/translate/translator.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants