Translation
COMET
Vilém Zouhar commited on
Commit
c51e020
·
verified ·
1 Parent(s): f620a13

Update example to English->German

Browse files
Files changed (1) hide show
  1. README.md +12 -7
README.md CHANGED
@@ -119,19 +119,24 @@ pip3 install -e comet_early_exit
119
  This model is described in the appendix in the paper.
120
  It is able to score even *incomplete* translations (i.e. prefixes of translations):
121
  ```python
 
122
  model = comet_early_exit.load_from_checkpoint(comet_early_exit.download_model("zouharvi/COMET-partial"))
123
  data = [
124
  {
125
- "src": "Can I receive my food in 10 to 15 minutes?",
126
- "mt": "Mohl bych",
127
  },
128
  {
129
- "src": "Can I receive my food in 10 to 15 minutes?",
130
- "mt": "Mohl bych dostat jídlo",
131
  },
132
  {
133
- "src": "Can I receive my food in 10 to 15 minutes?",
134
- "mt": "Mohl bych dostat jídlo během 10 či 15 minut?",
 
 
 
 
135
  }
136
  ]
137
  model_output = model.predict(data, batch_size=8, gpus=1)
@@ -139,7 +144,7 @@ print("scores", model_output["scores"])
139
  ```
140
  Outputs (formatted):
141
  ```
142
- scores 89.18 86.52 89.20
143
  ```
144
 
145
  This model is based on the work [Early-Exit and Instant Confidence Translation Quality Estimation](http://arxiv.org/abs/2502.14429) which can be cited as:
 
119
  This model is described in the appendix in the paper.
120
  It is able to score even *incomplete* translations (i.e. prefixes of translations):
121
  ```python
122
+ import comet_early_exit
123
  model = comet_early_exit.load_from_checkpoint(comet_early_exit.download_model("zouharvi/COMET-partial"))
124
  data = [
125
  {
126
+ "src": "Will I receive my food in 10 to 15 minutes?",
127
+ "mt": "Ich bekomme",
128
  },
129
  {
130
+ "src": "Will I receive my food in 10 to 15 minutes?",
131
+ "mt": "Bekomme ich",
132
  },
133
  {
134
+ "src": "Will I receive my food in 10 to 15 minutes?",
135
+ "mt": "Bekomme ich mein Essen in",
136
+ },
137
+ {
138
+ "src": "Will I receive my food in 10 to 15 minutes?",
139
+ "mt": "Bekomme ich mein Essen in 10 bis 15 Minuten?",
140
  }
141
  ]
142
  model_output = model.predict(data, batch_size=8, gpus=1)
 
144
  ```
145
  Outputs (formatted):
146
  ```
147
+ scores 89.58 88.99 89.94 89.94
148
  ```
149
 
150
  This model is based on the work [Early-Exit and Instant Confidence Translation Quality Estimation](http://arxiv.org/abs/2502.14429) which can be cited as: