🚀 TransQuest:基于跨语言Transformer的翻译质量评估工具
翻译质量评估(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-any_en", 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 质量评估共享任务中使用 TransQuest 的多个示例。
- 句子级示例
- 单词级示例
- 预训练模型:提供了涵盖句子级和单词级的十五种语言对的预训练质量评估模型。
- 句子级模型
- 单词级模型
- 联系我们:如果在使用 TransQuest 时遇到任何问题,请联系我们。
📄 许可证
本项目采用 Apache-2.0 许可证。
📚 引用说明
如果您使用了单词级架构,请考虑引用这篇已被 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}
}