Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,95 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
pipeline_tag: translation
|
3 |
+
language:
|
4 |
+
- multilingual
|
5 |
+
- af
|
6 |
+
- am
|
7 |
+
- ar
|
8 |
+
- en
|
9 |
+
- fr
|
10 |
+
- ha
|
11 |
+
- ig
|
12 |
+
- mg
|
13 |
+
- ny
|
14 |
+
- om
|
15 |
+
- pcm
|
16 |
+
- rn
|
17 |
+
- rw
|
18 |
+
- sn
|
19 |
+
- so
|
20 |
+
- st
|
21 |
+
- sw
|
22 |
+
- xh
|
23 |
+
- yo
|
24 |
+
- zu
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
license: apache-2.0
|
33 |
---
|
34 |
+
|
35 |
+
This is a [AfriCOMET-MTL (multi-task learning)](https://github.com/masakhane-io/africomet) evaluation model: It receives a triplet with (source sentence, translation, reference translation) and returns a score that reflects the quality of the translation compared to both source and reference.
|
36 |
+
|
37 |
+
# Paper
|
38 |
+
|
39 |
+
[AfriMTE and AfriCOMET: Empowering COMET to Embrace Under-resourced African Languages](https://arxiv.org/abs/2311.09828) (Wang et al., arXiv 2023)
|
40 |
+
|
41 |
+
# License
|
42 |
+
|
43 |
+
Apache-2.0
|
44 |
+
|
45 |
+
# Usage (unbabel-comet)
|
46 |
+
|
47 |
+
Using this model requires unbabel-comet to be installed:
|
48 |
+
|
49 |
+
```bash
|
50 |
+
pip install --upgrade pip # ensures that pip is current
|
51 |
+
pip install unbabel-comet
|
52 |
+
```
|
53 |
+
|
54 |
+
Then you can use it through comet CLI:
|
55 |
+
|
56 |
+
```bash
|
57 |
+
comet-score -s {source-inputs}.txt -t {translation-outputs}.txt -r {references}.txt --model masakhane/africomet-mtl
|
58 |
+
```
|
59 |
+
|
60 |
+
Or using Python:
|
61 |
+
|
62 |
+
```python
|
63 |
+
from comet import download_model, load_from_checkpoint
|
64 |
+
|
65 |
+
model_path = download_model("masakhane/africomet-mtl")
|
66 |
+
model = load_from_checkpoint(model_path)
|
67 |
+
data = [
|
68 |
+
{
|
69 |
+
"src": "Nadal sàkọọ́lẹ̀ ìforígbárí o ní àmì méje sóódo pẹ̀lú ilẹ̀ Canada.",
|
70 |
+
"mt": "Nadal's head to head record against the Canadian is 7–2.",
|
71 |
+
"ref": "Nadal scored seven unanswered points against Canada."
|
72 |
+
},
|
73 |
+
{
|
74 |
+
"src": "Laipe yi o padanu si Raoniki ni ere Sisi Brisbeni.",
|
75 |
+
"mt": "He recently lost against Raonic in the Brisbane Open.",
|
76 |
+
"ref": "He recently lost to Raoniki in the game Sisi Brisbeni."
|
77 |
+
}
|
78 |
+
]
|
79 |
+
model_output = model.predict(data, batch_size=8, gpus=1)
|
80 |
+
print (model_output)
|
81 |
+
```
|
82 |
+
|
83 |
+
# Intended uses
|
84 |
+
|
85 |
+
Our model is intented to be used for **MT evaluation**.
|
86 |
+
|
87 |
+
Given a a triplet with (source sentence, translation, reference translation) outputs a single score between 0 and 1 where 1 represents a perfect translation.
|
88 |
+
|
89 |
+
# Languages Covered:
|
90 |
+
|
91 |
+
This model builds on top of AfroXLMR which cover the following languages:
|
92 |
+
|
93 |
+
Afrikaans, Arabic, Amharic, English, French, Hausa, Igbo, Malagasy, Chichewa, Oromo, Nigerian-Pidgin, Kinyarwanda, Kirundi, Shona, Somali, Sesotho, Swahili, isiXhosa, Yoruba, and isiZulu.
|
94 |
+
|
95 |
+
Thus, results for language pairs containing uncovered languages are unreliable!
|