一种同时具有翻译能力和自我评估能力的NMT,训练仅基于平行双语数据,不依赖参考译文和人工打分数据。backbone选用先进的transformer-large模型,编码器和解码器深度分别为24和6,相关论文已发表于EMNLP 2022。
本模型适用于一定数据规模(百万级以上)的所有翻译语向。
在ModelScope框架上,提供输入源文,即可通过简单的Pipeline调用来使用。
# Chinese-to-English
# 温馨提示: 使用pipeline推理及在线体验功能的时候,尽量输入单句文本,如果是多句长文本建议人工分句,否则可能出现漏译或未译等情况!!!
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
input_sequence = '110例癫痫患者血清抗脑抗体的测定'
pipeline_ins = pipeline(task=Tasks.competency_aware_translation, model="damo/nlp_canmt_translation_zh2en_large")
outputs = pipeline_ins(input=input_sequence)
print(outputs) # (translation: ['Determination of serum anti-brain antibodies in 110 patients with epilepsy'], self-estimation: [1.7111575603485107])
如果你觉得这个该模型对有所帮助,请考虑引用下面的相关的论文:
@inproceedings{Zhang2022CompetencyAwareNM,
title={Competency-Aware Neural Machine Translation: Can Machine Translation Know its Own Translation Quality?},
author={Pei Zhang and Baosong Yang and Hao-Ran Wei and Dayiheng Liu and Kai Fan and Luo Si and Jun Xie},
booktitle={Conference on Empirical Methods in Natural Language Processing},
year={2022}
}