语言:si-en
标签:
- 质量评估
- 单语TransQuest
- 直接评估
许可证:apache-2.0
TransQuest:基于跨语言Transformer的翻译质量评估
质量评估(QE)的目标是在无需参考译文的情况下评估翻译质量。高精度且能轻松部署于多种语言对的QE是许多商业翻译流程中缺失的一环,因其具备多重潜在用途。当多个翻译引擎可用时,QE可用于选择最佳译文,或向终端用户提示自动翻译内容的可靠性。此外,QE系统还能判断翻译在特定上下文中是否可直接发布,或需要人工后期编辑甚至重新翻译。质量评估可在不同层级进行:文档级、句子级和词汇级。
通过TransQuest,我们开源了在翻译质量评估领域的研究成果,该成果还赢得了WMT 2020句子级直接评估质量评估共享任务的冠军。TransQuest在性能上超越了当前开源的质量评估框架如OpenKiwi和DeepQuest。
功能特点
- 支持句子级翻译质量评估的双重维度:预测后期编辑需求与直接评估。
- 词汇级翻译质量评估,可预测源词、目标词及目标空缺的质量。
- 在实验涉及的所有语言中,性能均超越当前最先进的质量评估方法如DeepQuest和OpenKiwi。
- 提供十五种语言对的预训练质量评估模型,详见HuggingFace。
安装指南
通过pip安装
pip install transquest
源码安装
git clone https://github.com/TharinduDR/TransQuest.git
cd TransQuest
pip install -r requirements.txt
使用预训练模型
import torch
from transquest.algo.sentence_level.monotransquest.run_model import MonoTransQuestModel
model = MonoTransQuestModel("xlmroberta", "TransQuest/monotransquest-da-si_en-wiki", num_labels=1, use_cuda=torch.cuda.is_available())
predictions, raw_outputs = model.predict([["Reducerea acestor conflicte este importantă pentru conservare.", "Reducing these conflicts is not important for preservation."]])
print(predictions)
文档资料
更多详情请参阅文档:
- 安装指南 - 通过pip本地安装TransQuest。
- 架构说明 - 查看TransQuest实现的架构:
- 句子级架构 - 提供MonoTransQuest和SiameseTransQuest两种架构用于句子级质量评估。
- 词汇级架构 - 提供MicroTransQuest架构用于词汇级质量评估。
- 示例教程 - 提供多个基于近期WMT质量评估共享任务的使用示例:
- 句子级示例
- 词汇级示例
- 预训练模型 - 提供涵盖15种语言对的预训练质量评估模型,覆盖句子级和词汇级:
- 句子级模型
- 词汇级模型
- 联系我们 - 如有任何问题请联系我们
引用文献
若使用词汇级架构,请引用这篇被ACL 2021收录的论文:
@InProceedings{ranasinghe2021,
author = {Ranasinghe, Tharindu and Orasan, Constantin and Mitkov, Ruslan},
title = {An Exploratory Analysis of Multilingual Word Level Quality Estimation with Cross-Lingual Transformers},
booktitle = {Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics},
year = {2021}
}
若使用句子级架构,请引用这些发表于COLING 2020和WMT 2020(EMNLP 2020)的论文:
@InProceedings{transquest:2020a,
author = {Ranasinghe, Tharindu and Orasan, Constantin and Mitkov, Ruslan},
title = {TransQuest: Translation Quality Estimation with Cross-lingual Transformers},
booktitle = {Proceedings of the 28th International Conference on Computational Linguistics},
year = {2020}
}
@InProceedings{transquest:2020b,
author = {Ranasinghe, Tharindu and Orasan, Constantin and Mitkov, Ruslan},
title = {TransQuest at WMT2020: Sentence-Level Direct Assessment},
booktitle = {Proceedings of the Fifth Conference on Machine Translation},
year = {2020}
}