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 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.
翻译:虽然神经机器翻译(NMT)在不受限制的情况下取得了很强的性能,但对NMT模型的翻译过程施加预先规定的限制却非三重性。虽然已经提出了许多方法来解决这个问题,但大多数现有方法不能同时满足以下三种偏差:(1) 高翻译质量,(2) 高匹配准确性,(3) 低延迟性。在这项工作中,我们提出了一个基于模板的方法,可以产生高翻译质量和准确性的结果,而我们方法的推论速度可以与不受限制NMT模型相比。我们的基本想法是通过模板重新安排受限制和不受限制的符号的生成。我们的方法不需要在模型结构和解码算法方面作任何改变。实验结果显示,基于模板的拟议方法在词汇和结构受限制的翻译任务中都比几个有代表性的基线要强。