🚀 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.siamesetransquest.run_model import SiameseTransQuestModel
model = SiameseTransQuestModel("TransQuest/siamesetransquest-da-multilingual")
predictions = 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}
}