Skip to content

Commit 1f04cbb

Browse files
authored
* Update score list (#46)
* Update score list * Comet score
1 parent b00dc2b commit 1f04cbb

File tree

1 file changed

+94
-26
lines changed

1 file changed

+94
-26
lines changed

score.md

Lines changed: 94 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ To compare a machine translation with a reference translation, send a POST reque
99
**Scores:**
1010

1111
- [hlepor](https://github.com/aaronlifenghan/aaron-project-hlepor)
12-
- [bleu-corpus](https://github.com/moses-smt/mosesdecoder/blob/master/scripts/generic/multi-bleu-detok.perl)
13-
- [bleu-sentence](https://github.com/odashi/mteval)
1412
- [ribes](http://www.kecl.ntt.co.jp/icl/lirg/ribes/)
1513
- [ter](https://github.com/jhclark/tercom)
1614
- [sacrebleu](https://github.com/awslabs/sockeye/tree/3cca0c3ec397fbcb4c0ff0f51487e29338f53614/sockeye_contrib/sacrebleu)
1715
- [rouge](https://github.com/pltrdy/rouge)
16+
- [chrf](https://github.com/mjpost/sacrebleu)
17+
- [bert](https://github.com/Tiiiger/bert_score)
1818

1919
### Basic usage
2020

@@ -37,7 +37,7 @@ curl -XPOST -H 'apikey: YOUR_API_KEY' 'https://api.inten.to/evaluate/score' -d
3737
"ignore_errors": true
3838
},
3939
{
40-
"name": "bleu-corpus",
40+
"name": "ter",
4141
"ignore_errors": true
4242
}
4343
],
@@ -62,11 +62,11 @@ Wait for processing to complete. To retrieve the result of the operation, make a
6262
"scores": [
6363
{
6464
"name": "hlepor",
65-
"value": 0.91
65+
"value": 0.755
6666
},
6767
{
68-
"name": "bleu-corpus",
69-
"value": 0.95
68+
"name": "ter",
69+
"value": 28.571
7070
}
7171
]
7272
}
@@ -84,30 +84,98 @@ To get scores for each pair of items (machine translation and reference), set it
8484
"response": {
8585
"results": {
8686
"scores": [
87-
[
88-
{
89-
"name": "hlepor",
90-
"value": 0.85
91-
},
92-
{
93-
"name": "hlepor",
94-
"value": 0.95
95-
}
96-
],
97-
[
98-
{
99-
"name": "bleu-corpus",
100-
"value": 0.89
101-
},
102-
{
103-
"name": "bleu-corpus",
104-
"value": 0.99
105-
}
106-
]
87+
{
88+
"value": 0.770527098111673,
89+
"name": "hlepor"
90+
},
91+
{
92+
"value": 0.740740740740741,
93+
"name": "hlepor"
94+
},
95+
{
96+
"value": 25.0,
97+
"name": "ter"
98+
},
99+
{
100+
"value": 33.33333333333333,
101+
"name": "ter"
102+
}
107103
]
108104
}
109105
},
110106
"error": null,
111107
"done": true
112108
}
113109
```
110+
111+
## COMET
112+
113+
Crosslingual Optimized Metric for Evaluation of Translation ([COMET](https://github.com/Unbabel/COMET)) is metrics that achieve high levels of correlation with different types of human judgments. COMET takes 3 lists of strings as input: `sources` - a list of source sentences, `items` - results of the machine translation and `references` - ground truth and language. List one or more currently implemented score functions, using ignore_errors flag to return result no matter of previous errors. Note that evaluation endpoints are supported only in async mode.
114+
115+
### Basic usage
116+
117+
```sh
118+
curl -XPOST -H 'apikey: YOUR_API_KEY' 'https://api.inten.to/evaluate/score' -d '{
119+
"data": {
120+
"items": [
121+
"A sample text",
122+
"Some other text"
123+
],
124+
"reference": [
125+
"Not a sample text",
126+
"Some other context"
127+
],
128+
"source": [
129+
"Un texto de muestra",
130+
"Algún otro texto"
131+
],
132+
"lang": "en"
133+
},
134+
"scores": [
135+
{
136+
"name": "comet",
137+
"ignore_errors": true
138+
}
139+
],
140+
"itemize": false,
141+
"async": true
142+
}'
143+
```
144+
145+
The response contains id of the operation:
146+
147+
```json
148+
{ "id": "c74934b3-89e9-463e-b358-335c7c717f02" }
149+
```
150+
151+
Wait for processing to complete.
152+
153+
```json
154+
{
155+
"id": "c74934b3-89e9-463e-b358-335c7c717f02",
156+
"done": true,
157+
"response": {
158+
"results": {
159+
"scores": [
160+
{
161+
"value": {
162+
"segment_scores": [
163+
0.3271389603614807,
164+
0.08198270201683044
165+
],
166+
"corpus_scores": [
167+
0.20456083118915558
168+
],
169+
"return_hash": "wmt20-comet-da"
170+
},
171+
"name": "comet"
172+
}
173+
]
174+
},
175+
"type": "scores"
176+
},
177+
"meta": {},
178+
"error": null
179+
}
180+
```
181+

0 commit comments

Comments
 (0)