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. 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 while keeping the decoding speed. Our basic idea is to rearrange the generation of constrained and unconstrained tokens through a template. The generation and derivation of the template can be learned through one sequence-to-sequence training framework. Thus our method does not require any changes in the model architecture and the decoding algorithm, making it easy to apply. Experimental results show that the proposed template-based methods can outperform several representative baselines in lexically and structurally constrained translation tasks.
翻译:虽然神经机器翻译(NMT)在不受限制的情况下取得了很强的性能,但我们的基本想法是通过一个模板重新安排生成受限制和不受限制的符号。模板的生成和衍生可以通过一个顺序到顺序的培训框架来学习。因此,我们的方法不需要对模型结构和解码算法作任何改动,这样就容易应用。实验结果显示,拟议的模板方法可以超越在词汇和结构上受限制的翻译任务方面的几个代表性基线。