语言: 英语-拉脱维亚语
标签:
- 质量评估
- 微型TransQuest
许可证: Apache-2.0
TransQuest:基于跨语言Transformer的翻译质量评估
质量评估(QE)的目标是在无需参考译文的情况下,评估翻译的质量。高精度且能轻松部署于多种语言对的QE技术,是当前许多商业翻译工作流中缺失的一环,因其具备广泛的应用潜力。例如,当存在多个翻译引擎时,QE可用于选择最佳译文;或向终端用户提示自动翻译内容的可靠性。此外,QE系统还能帮助决策:在特定场景下,译文是否可直接发布,还是需要人工后期编辑,或完全由人工重新翻译。质量评估可在不同层级进行:文档级、句子级和词汇级。
通过TransQuest,我们开源了在翻译质量评估领域的研究成果,该成果还赢得了WMT 2020句子级直接评估质量评估任务的冠军。TransQuest在性能上超越了当前开源的质量评估框架如OpenKiwi和DeepQuest。
功能特点
- 句子级翻译质量评估:支持预测后期编辑需求和直接评估两个维度。
- 词汇级翻译质量评估:可预测源词、目标词及目标空缺部分的质量。
- 性能卓越:在实验涉及的所有语言中均超越DeepQuest和OpenKiwi等当前最优方法。
- 预训练模型:提供15种语言对的预训练质量评估模型,详见HuggingFace。
安装指南
通过pip安装
pip install transquest
从源码安装
git clone https://github.com/TharinduDR/TransQuest.git
cd TransQuest
pip install -r requirements.txt
使用预训练模型
from transquest.algo.word_level.microtransquest.run_model import MicroTransQuestModel
import torch
model = MicroTransQuestModel("xlmroberta", "TransQuest/microtransquest-en_lv-pharmaceutical-smt", labels=["OK", "BAD"], use_cuda=torch.cuda.is_available())
source_tags, target_tags = model.predict([["if not , you may not be protected against the diseases . ", "ja tā nav , Jūs varat nepasargāt no slimībām . "]])
文档资源
更多细节请参阅文档:
- 安装指南 - 通过pip本地安装TransQuest。
- 架构说明 - 查看TransQuest实现的架构:
- 句子级架构 - 提供MonoTransQuest和SiameseTransQuest两种架构用于句子级质量评估。
- 词汇级架构 - 提供MicroTransQuest用于词汇级质量评估。
- 示例教程 - 提供在近期WMT质量评估任务中使用TransQuest的多个示例:
- 预训练模型 - 提供涵盖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}
}