Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,137 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
pipeline_tag: translation
|
3 |
+
language:
|
4 |
+
- multilingual
|
5 |
+
- en
|
6 |
+
- am
|
7 |
+
- ar
|
8 |
+
- so
|
9 |
+
- sw
|
10 |
+
- pt
|
11 |
+
- af
|
12 |
+
- fr
|
13 |
+
- zu
|
14 |
+
- mg
|
15 |
+
- ha
|
16 |
+
- sn
|
17 |
+
- arz
|
18 |
+
- ny
|
19 |
+
- ig
|
20 |
+
- xh
|
21 |
+
- yo
|
22 |
+
- st
|
23 |
+
- rw
|
24 |
+
- tn
|
25 |
+
- ti
|
26 |
+
- ts
|
27 |
+
- om
|
28 |
+
- run
|
29 |
+
- nso
|
30 |
+
- ee
|
31 |
+
- ln
|
32 |
+
- tw
|
33 |
+
- pcm
|
34 |
+
- gaa
|
35 |
+
- loz
|
36 |
+
- lg
|
37 |
+
- guw
|
38 |
+
- bem
|
39 |
+
- efi
|
40 |
+
- lue
|
41 |
+
- lua
|
42 |
+
- toi
|
43 |
+
- ve
|
44 |
+
- tum
|
45 |
+
- tll
|
46 |
+
- iso
|
47 |
+
- kqn
|
48 |
+
- zne
|
49 |
+
- umb
|
50 |
+
- mos
|
51 |
+
- tiv
|
52 |
+
- lu
|
53 |
+
- ff
|
54 |
+
- kwy
|
55 |
+
- bci
|
56 |
+
- rnd
|
57 |
+
- luo
|
58 |
+
- wal
|
59 |
+
- ss
|
60 |
+
- lun
|
61 |
+
- wo
|
62 |
+
- nyk
|
63 |
+
- kj
|
64 |
+
- ki
|
65 |
+
- fon
|
66 |
+
- bm
|
67 |
+
- cjk
|
68 |
+
- din
|
69 |
+
- dyu
|
70 |
+
- kab
|
71 |
+
- kam
|
72 |
+
- kbp
|
73 |
+
- kr
|
74 |
+
- kmb
|
75 |
+
- kg
|
76 |
+
- nus
|
77 |
+
- sg
|
78 |
+
- taq
|
79 |
+
- tzm
|
80 |
+
- nqo
|
81 |
+
|
82 |
+
license: apache-2.0
|
83 |
+
---
|
84 |
+
|
85 |
+
This is an improved version of [AfriCOMET-QE-STL (quality estimation single task)](https://github.com/masakhane-io/africomet) evaluation model: It receives a source sentence, and a translation, and returns a score that reflects the quality of the translation compared to the source.
|
86 |
+
Different from the original AfriCOMET-QE-STL, this QE model is based on an improved African enhanced encoder, [afro-xlmr-large-76L](https://huggingface.co/Davlan/afro-xlmr-large-76L), which leads better performance on quality estimation of African-related machine translation, verified in WMT 2024 Metrics Shared Task.
|
87 |
+
|
88 |
+
# Paper
|
89 |
+
|
90 |
+
[AfriMTE and AfriCOMET: Empowering COMET to Embrace Under-resourced African Languages](https://arxiv.org/abs/2311.09828) (Wang et al., arXiv 2023)
|
91 |
+
|
92 |
+
# License
|
93 |
+
|
94 |
+
Apache-2.0
|
95 |
+
|
96 |
+
# Usage (AfriCOMET)
|
97 |
+
|
98 |
+
Using this model requires unbabel-comet to be installed:
|
99 |
+
|
100 |
+
```bash
|
101 |
+
pip install --upgrade pip # ensures that pip is current
|
102 |
+
pip install unbabel-comet
|
103 |
+
```
|
104 |
+
|
105 |
+
Then you can use it through comet CLI:
|
106 |
+
|
107 |
+
```bash
|
108 |
+
comet-score -s {source-inputs}.txt -t {translation-outputs}.txt --model masakhane/africomet-qe-stl
|
109 |
+
```
|
110 |
+
|
111 |
+
Or using Python:
|
112 |
+
```python
|
113 |
+
from comet import download_model, load_from_checkpoint
|
114 |
+
|
115 |
+
model_path = download_model("masakhane/africomet-qe-stl")
|
116 |
+
model = load_from_checkpoint(model_path)
|
117 |
+
data = [
|
118 |
+
{
|
119 |
+
"src": "Nadal sàkọọ́lẹ̀ ìforígbárí o ní àmì méje sóódo pẹ̀lú ilẹ̀ Canada.",
|
120 |
+
"mt": "Nadal's head to head record against the Canadian is 7–2.",
|
121 |
+
},
|
122 |
+
{
|
123 |
+
"src": "Laipe yi o padanu si Raoniki ni ere Sisi Brisbeni.",
|
124 |
+
"mt": "He recently lost against Raonic in the Brisbane Open.",
|
125 |
+
}
|
126 |
+
]
|
127 |
+
model_output = model.predict(data, batch_size=8, gpus=1)
|
128 |
+
print (model_output)
|
129 |
+
```
|
130 |
+
|
131 |
+
# Intended uses
|
132 |
+
|
133 |
+
Our model is intented to be used for **MT quality estimation**.
|
134 |
+
|
135 |
+
Given a source sentence and a translation outputs a single score between 0 and 1 where 1 represents a perfect translation.
|
136 |
+
|
137 |
+
|