A Template-based Method for Constrained Neural Machine Translation

Shuo Wang, Peng Li, Zhixing Tan, Zhaopeng Tu, Maosong Sun +1 more
5/23/2022
cs.CL

Official code: THUNLP-MT/Template-NMT (23 stars, Python, last commit 2022-11-15).

Abstract

Machine translation systems are expected to cope with various types of constraints in many practical scenarios. While neural machine translation (NMT) has achieved strong performance in unconstrained cases, it is non-trivial to impose pre-specified constraints into the translation process of NMT models.

Show full abstract

Although many approaches have been proposed to address this issue, most existing methods can not satisfy the following three desiderata at the same time: (1) high translation quality, (2) high match accuracy, and (3) low latency. In this work, we propose a template-based method that can yield results with high translation quality and match accuracy and the inference speed of our method is comparable with unconstrained NMT models. Our basic idea is to rearrange the generation of constrained and unconstrained tokens through a template. Our method does not require any changes in the model architecture and the decoding algorithm. Experimental results show that the proposed template-based approach can outperform several representative baselines in both lexically and structurally constrained translation tasks.

View on arXivView PDF

Code Implementations(1)

232Python, Jupyter NotebookOct 18, 20224 years ago

Similar Papers

Cite this paper

@article{wang2022templatebased,
  title  = {A Template-based Method for Constrained Neural Machine Translation},
  author = {Shuo Wang and Peng Li and Zhixing Tan and Zhaopeng Tu and Maosong Sun and Yang Liu},
  year   = {2022},
  eprint = {2205.11255},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.11255}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.11255.svg)](https://codeofpaper.com/paper/2205.11255)

Discussion