EuroEval 16.4.0__py3-none-any.whl → 16.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of EuroEval might be problematic. Click here for more details.
- euroeval/__init__.py +6 -0
- euroeval/benchmark_config_factory.py +51 -46
- euroeval/benchmark_modules/base.py +6 -5
- euroeval/benchmark_modules/hf.py +2 -9
- euroeval/benchmark_modules/litellm.py +14 -12
- euroeval/benchmark_modules/vllm.py +17 -10
- euroeval/benchmarker.py +61 -44
- euroeval/caching_utils.py +1 -1
- euroeval/cli.py +86 -8
- euroeval/constants.py +3 -0
- euroeval/data_loading.py +78 -30
- euroeval/data_models.py +326 -326
- euroeval/dataset_configs/__init__.py +10 -3
- euroeval/dataset_configs/bulgarian.py +56 -0
- euroeval/dataset_configs/czech.py +25 -29
- euroeval/dataset_configs/danish.py +51 -88
- euroeval/dataset_configs/dutch.py +48 -86
- euroeval/dataset_configs/english.py +45 -76
- euroeval/dataset_configs/estonian.py +36 -38
- euroeval/dataset_configs/faroese.py +19 -60
- euroeval/dataset_configs/finnish.py +36 -68
- euroeval/dataset_configs/french.py +39 -74
- euroeval/dataset_configs/german.py +45 -81
- euroeval/dataset_configs/greek.py +64 -0
- euroeval/dataset_configs/icelandic.py +54 -91
- euroeval/dataset_configs/italian.py +42 -78
- euroeval/dataset_configs/latvian.py +28 -34
- euroeval/dataset_configs/lithuanian.py +22 -26
- euroeval/dataset_configs/norwegian.py +72 -114
- euroeval/dataset_configs/polish.py +33 -60
- euroeval/dataset_configs/portuguese.py +33 -65
- euroeval/dataset_configs/serbian.py +64 -0
- euroeval/dataset_configs/slovak.py +19 -24
- euroeval/dataset_configs/spanish.py +42 -76
- euroeval/dataset_configs/swedish.py +48 -84
- euroeval/dataset_configs/ukrainian.py +64 -0
- euroeval/exceptions.py +1 -1
- euroeval/finetuning.py +3 -2
- euroeval/generation.py +5 -4
- euroeval/generation_utils.py +6 -5
- euroeval/languages.py +395 -323
- euroeval/metrics/huggingface.py +14 -3
- euroeval/metrics/llm_as_a_judge.py +1 -1
- euroeval/model_cache.py +6 -5
- euroeval/model_loading.py +1 -1
- euroeval/prompt_templates/__init__.py +2 -0
- euroeval/prompt_templates/classification.py +206 -0
- euroeval/prompt_templates/linguistic_acceptability.py +82 -43
- euroeval/prompt_templates/multiple_choice.py +81 -41
- euroeval/prompt_templates/named_entity_recognition.py +125 -44
- euroeval/prompt_templates/reading_comprehension.py +92 -43
- euroeval/prompt_templates/sentiment_classification.py +91 -43
- euroeval/prompt_templates/summarization.py +64 -39
- euroeval/prompt_templates/token_classification.py +279 -0
- euroeval/scores.py +4 -3
- euroeval/speed_benchmark.py +2 -1
- euroeval/task_group_utils/multiple_choice_classification.py +2 -1
- euroeval/task_group_utils/question_answering.py +24 -13
- euroeval/task_group_utils/sequence_classification.py +5 -4
- euroeval/task_group_utils/text_to_text.py +2 -1
- euroeval/task_group_utils/token_classification.py +11 -8
- euroeval/tasks.py +44 -1
- euroeval/tokenisation_utils.py +19 -10
- euroeval/types.py +10 -9
- euroeval/utils.py +6 -3
- {euroeval-16.4.0.dist-info → euroeval-16.5.0.dist-info}/METADATA +194 -37
- euroeval-16.5.0.dist-info/RECORD +81 -0
- euroeval-16.4.0.dist-info/RECORD +0 -75
- {euroeval-16.4.0.dist-info → euroeval-16.5.0.dist-info}/WHEEL +0 -0
- {euroeval-16.4.0.dist-info → euroeval-16.5.0.dist-info}/entry_points.txt +0 -0
- {euroeval-16.4.0.dist-info → euroeval-16.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -4,34 +4,46 @@ import typing as t
|
|
|
4
4
|
|
|
5
5
|
from ..data_models import PromptConfig
|
|
6
6
|
from ..languages import (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
7
|
+
BULGARIAN,
|
|
8
|
+
CZECH,
|
|
9
|
+
DANISH,
|
|
10
|
+
DUTCH,
|
|
11
|
+
ENGLISH,
|
|
12
|
+
ESTONIAN,
|
|
13
|
+
FAROESE,
|
|
14
|
+
FINNISH,
|
|
15
|
+
FRENCH,
|
|
16
|
+
GERMAN,
|
|
17
|
+
GREEK,
|
|
18
|
+
ICELANDIC,
|
|
19
|
+
ITALIAN,
|
|
20
|
+
LATVIAN,
|
|
21
|
+
LITHUANIAN,
|
|
22
|
+
NORWEGIAN,
|
|
23
|
+
NORWEGIAN_BOKMÅL,
|
|
24
|
+
NORWEGIAN_NYNORSK,
|
|
25
|
+
POLISH,
|
|
26
|
+
PORTUGUESE,
|
|
27
|
+
SERBIAN,
|
|
28
|
+
SLOVAK,
|
|
29
|
+
SPANISH,
|
|
30
|
+
SWEDISH,
|
|
31
|
+
UKRAINIAN,
|
|
28
32
|
)
|
|
29
33
|
|
|
30
34
|
if t.TYPE_CHECKING:
|
|
31
|
-
from ..
|
|
35
|
+
from ..languages import Language
|
|
32
36
|
|
|
33
37
|
RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
34
|
-
|
|
38
|
+
BULGARIAN: PromptConfig(
|
|
39
|
+
default_prompt_prefix="Следват текстове със съответни въпроси и отговори.",
|
|
40
|
+
default_prompt_template="Текст: {text}\nВъпрос: {question}\nОтговор с максимум "
|
|
41
|
+
"3 думи: {label}",
|
|
42
|
+
default_instruction_prompt="Текст: {text}\n\nОтговорете на следния въпрос "
|
|
43
|
+
"относно текста по-горе с максимум 3 думи.\n\nВъпрос: {question}",
|
|
44
|
+
default_prompt_label_mapping=dict(),
|
|
45
|
+
),
|
|
46
|
+
CZECH: PromptConfig(
|
|
35
47
|
default_prompt_prefix="Následující texty obsahují otázky a odpovědi.",
|
|
36
48
|
default_prompt_template=(
|
|
37
49
|
"Text: {text}\nOtázka: {question}\nOdpověď maximálně 3 slovy: {label}"
|
|
@@ -44,7 +56,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
44
56
|
),
|
|
45
57
|
default_prompt_label_mapping=dict(),
|
|
46
58
|
),
|
|
47
|
-
|
|
59
|
+
DANISH: PromptConfig(
|
|
48
60
|
default_prompt_prefix="Følgende er tekster med tilhørende spørgsmål og svar.",
|
|
49
61
|
default_prompt_template="Tekst: {text}\nSpørgsmål: {question}\nSvar med maks. "
|
|
50
62
|
"3 ord: {label}",
|
|
@@ -52,7 +64,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
52
64
|
"teksten ovenfor med maks. 3 ord.\n\nSpørgsmål: {question}",
|
|
53
65
|
default_prompt_label_mapping=dict(),
|
|
54
66
|
),
|
|
55
|
-
|
|
67
|
+
GERMAN: PromptConfig(
|
|
56
68
|
default_prompt_prefix="Im Folgenden finden Sie Texte mit den dazugehörigen "
|
|
57
69
|
"Fragen und Antworten.",
|
|
58
70
|
default_prompt_template="Text: {text}\nFragen: {question}\nFragen Antwort in "
|
|
@@ -61,7 +73,16 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
61
73
|
"zum obigen Text in höchstens 3 Wörtern.\n\nFrage: {question}",
|
|
62
74
|
default_prompt_label_mapping=dict(),
|
|
63
75
|
),
|
|
64
|
-
|
|
76
|
+
GREEK: PromptConfig(
|
|
77
|
+
default_prompt_prefix="Ακολουθούν κείμενα με τις αντίστοιχες ερωτήσεις και "
|
|
78
|
+
"απαντήσεις.",
|
|
79
|
+
default_prompt_template="Κείμενο: {text}\nΕρώτηση: {question}\nΑπάντηση σε το "
|
|
80
|
+
"πολύ 3 λέξεις: {label}",
|
|
81
|
+
default_instruction_prompt="Κείμενο: {text}\n\nΑπαντήστε την παρακάτω ερώτηση "
|
|
82
|
+
"σχετικά με το παραπάνω κείμενο σε το πολύ 3 λέξεις.\n\nΕρώτηση: {question}",
|
|
83
|
+
default_prompt_label_mapping=dict(),
|
|
84
|
+
),
|
|
85
|
+
ENGLISH: PromptConfig(
|
|
65
86
|
default_prompt_prefix="The following are texts with accompanying questions and "
|
|
66
87
|
"answers.",
|
|
67
88
|
default_prompt_template="Text: {text}\nQuestion: {question}\nAnswer in max "
|
|
@@ -70,7 +91,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
70
91
|
"about the above text in at most 3 words.\n\nQuestion: {question}",
|
|
71
92
|
default_prompt_label_mapping=dict(),
|
|
72
93
|
),
|
|
73
|
-
|
|
94
|
+
SPANISH: PromptConfig(
|
|
74
95
|
default_prompt_prefix="A continuación se presentan textos con sus preguntas y "
|
|
75
96
|
"respuestas correspondientes.",
|
|
76
97
|
default_prompt_template="Texto: {text}\nPregunta: {question}\nRespuesta en "
|
|
@@ -79,7 +100,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
79
100
|
"sobre el texto anterior en máximo 3 palabras.\n\nPregunta: {question}",
|
|
80
101
|
default_prompt_label_mapping=dict(),
|
|
81
102
|
),
|
|
82
|
-
|
|
103
|
+
ESTONIAN: PromptConfig(
|
|
83
104
|
default_prompt_prefix="Järgnevad on tekstid koos küsimuste ja vastustega.",
|
|
84
105
|
default_prompt_template="Tekst: {text}\nKüsimus: {question}\nVasta "
|
|
85
106
|
"maksimaalselt 3 sõnaga: {label}",
|
|
@@ -87,7 +108,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
87
108
|
"ülevaltoodud teksti kohta maksimaalselt 3 sõnaga.\n\nKüsimus: {question}",
|
|
88
109
|
default_prompt_label_mapping=dict(),
|
|
89
110
|
),
|
|
90
|
-
|
|
111
|
+
FINNISH: PromptConfig(
|
|
91
112
|
default_prompt_prefix="Seuraavassa on tekstejä ja niihin liittyviä kysymyksiä "
|
|
92
113
|
"ja vastauksia.",
|
|
93
114
|
default_prompt_template="Teksti: {text}\nKysymys: {question} "
|
|
@@ -97,7 +118,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
97
118
|
"Kysymys: {question}",
|
|
98
119
|
default_prompt_label_mapping=dict(),
|
|
99
120
|
),
|
|
100
|
-
|
|
121
|
+
FAROESE: PromptConfig(
|
|
101
122
|
default_prompt_prefix="Hetta eru tekstir saman við spurningum og svar.",
|
|
102
123
|
default_prompt_template="Tekstur: {text}\nSpurningur: {question}\nSvara við í "
|
|
103
124
|
"mesta lagi trimum orðum: {label}",
|
|
@@ -105,7 +126,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
105
126
|
"tekstin uppiyvir við í mesta lagi trimum orðum.\n\nSpurningur: {question}",
|
|
106
127
|
default_prompt_label_mapping=dict(),
|
|
107
128
|
),
|
|
108
|
-
|
|
129
|
+
FRENCH: PromptConfig(
|
|
109
130
|
default_prompt_prefix="Les textes suivants sont accompagnés de questions et de "
|
|
110
131
|
"réponses.",
|
|
111
132
|
default_prompt_template="Texte: {text}\nQuestion: {question}\nRéponse en 3 "
|
|
@@ -114,7 +135,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
114
135
|
"sur le texte ci-dessus en 3 mots maximum.\n\nQuestion: {question}",
|
|
115
136
|
default_prompt_label_mapping=dict(),
|
|
116
137
|
),
|
|
117
|
-
|
|
138
|
+
ICELANDIC: PromptConfig(
|
|
118
139
|
default_prompt_prefix="Eftirfarandi eru textar með tilheyrandi spurningum og "
|
|
119
140
|
"svörum.",
|
|
120
141
|
default_prompt_template="Texti: {text}\nSpurning: {question}\nSvaraðu með að "
|
|
@@ -123,7 +144,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
123
144
|
"textann að hámarki í 3 orðum.\n\nSpurning: {question}",
|
|
124
145
|
default_prompt_label_mapping=dict(),
|
|
125
146
|
),
|
|
126
|
-
|
|
147
|
+
ITALIAN: PromptConfig(
|
|
127
148
|
default_prompt_prefix="I testi che seguono sono accompagnati da domande e "
|
|
128
149
|
"risposte.",
|
|
129
150
|
default_prompt_template="Testo: {text}\nDomanda: {question}\nRispondere in "
|
|
@@ -132,7 +153,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
132
153
|
"sul in un massimo di 3 parole.\n\nDomanda: {question}",
|
|
133
154
|
default_prompt_label_mapping=dict(),
|
|
134
155
|
),
|
|
135
|
-
|
|
156
|
+
LITHUANIAN: PromptConfig(
|
|
136
157
|
default_prompt_prefix="Toliau pateikti tekstai su atitinkamais klausimais ir "
|
|
137
158
|
"atsakymais.",
|
|
138
159
|
default_prompt_template="Tekstas: {text}\nKlausimas: {question}\nAtsakykite ne "
|
|
@@ -141,7 +162,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
141
162
|
"aukščiau pateiktą tekstą ne daugiau kaip 3 žodžiais.\n\nKlausimas: {question}",
|
|
142
163
|
default_prompt_label_mapping=dict(),
|
|
143
164
|
),
|
|
144
|
-
|
|
165
|
+
LATVIAN: PromptConfig(
|
|
145
166
|
default_prompt_prefix="Turpmāk seko teksti ar atbilstošiem jautājumiem un "
|
|
146
167
|
"atbildēm.",
|
|
147
168
|
default_prompt_template="Teksts: {text}\nJautājums: {question}\nAtbildēt ar "
|
|
@@ -150,7 +171,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
150
171
|
"iepriekš minēto tekstu ar maksimāli 3 vārdiem.\n\nJautājums: {question}",
|
|
151
172
|
default_prompt_label_mapping=dict(),
|
|
152
173
|
),
|
|
153
|
-
|
|
174
|
+
NORWEGIAN_BOKMÅL: PromptConfig(
|
|
154
175
|
default_prompt_prefix="Her følger tekster med tilhørende spørsmål og svar.",
|
|
155
176
|
default_prompt_template="Tekst: {text}\nSpørsmål: {question}\nSvar på maks 3 "
|
|
156
177
|
"ord: {label}",
|
|
@@ -158,7 +179,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
158
179
|
"teksten ovenfor med maks 3 ord.\n\nSpørsmål: {question}",
|
|
159
180
|
default_prompt_label_mapping=dict(),
|
|
160
181
|
),
|
|
161
|
-
|
|
182
|
+
DUTCH: PromptConfig(
|
|
162
183
|
default_prompt_prefix="Hieronder volgen teksten met bijbehorende vragen en "
|
|
163
184
|
"antwoorden.",
|
|
164
185
|
default_prompt_template="Tekst: {text}\nVraag: {question}\nAntwoord in max "
|
|
@@ -167,7 +188,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
167
188
|
"over de bovenstaande tekst in maximaal 3 woorden.\n\nVraag: {question}",
|
|
168
189
|
default_prompt_label_mapping=dict(),
|
|
169
190
|
),
|
|
170
|
-
|
|
191
|
+
NORWEGIAN_NYNORSK: PromptConfig(
|
|
171
192
|
default_prompt_prefix="Her følger tekster med tilhørende spørsmål og svar.",
|
|
172
193
|
default_prompt_template="Tekst: {text}\nSpørsmål: {question}\nSvar på maks 3 "
|
|
173
194
|
"ord: {label}",
|
|
@@ -175,7 +196,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
175
196
|
"teksten ovenfor med maks 3 ord.\n\nSpørsmål: {question}",
|
|
176
197
|
default_prompt_label_mapping=dict(),
|
|
177
198
|
),
|
|
178
|
-
|
|
199
|
+
NORWEGIAN: PromptConfig(
|
|
179
200
|
default_prompt_prefix="Her følger tekster med tilhørende spørsmål og svar.",
|
|
180
201
|
default_prompt_template="Tekst: {text}\nSpørsmål: {question}\nSvar på maks 3 "
|
|
181
202
|
"ord: {label}",
|
|
@@ -183,7 +204,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
183
204
|
"teksten ovenfor med maks 3 ord.\n\nSpørsmål: {question}",
|
|
184
205
|
default_prompt_label_mapping=dict(),
|
|
185
206
|
),
|
|
186
|
-
|
|
207
|
+
POLISH: PromptConfig(
|
|
187
208
|
default_prompt_prefix=(
|
|
188
209
|
"Poniżej znajdują się teksty z towarzyszącymi pytaniami i odpowiedziami."
|
|
189
210
|
),
|
|
@@ -194,7 +215,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
194
215
|
"{question}",
|
|
195
216
|
default_prompt_label_mapping=dict(),
|
|
196
217
|
),
|
|
197
|
-
|
|
218
|
+
PORTUGUESE: PromptConfig(
|
|
198
219
|
default_prompt_prefix="Os textos que se seguem são acompanhados de perguntas "
|
|
199
220
|
"e respostas.",
|
|
200
221
|
default_prompt_template="Texto: {text}\nPergunta: {question}\nResposta com "
|
|
@@ -203,7 +224,7 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
203
224
|
"sobre o texto acima num máximo de 3 palavras.\n\nPergunta: {question}",
|
|
204
225
|
default_prompt_label_mapping=dict(),
|
|
205
226
|
),
|
|
206
|
-
|
|
227
|
+
SLOVAK: PromptConfig(
|
|
207
228
|
default_prompt_prefix=("Nasledujú texty s pridruženými otázkami a odpoveďami."),
|
|
208
229
|
default_prompt_template=(
|
|
209
230
|
"Text: {text}\nOtázka: {question}\nOdpoveď na maximálne 3 slová: {label}"
|
|
@@ -215,7 +236,21 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
215
236
|
),
|
|
216
237
|
default_prompt_label_mapping=dict(),
|
|
217
238
|
),
|
|
218
|
-
|
|
239
|
+
SERBIAN: PromptConfig(
|
|
240
|
+
default_prompt_prefix=(
|
|
241
|
+
"Следе текстови са одговарајућим питањима и одговорима."
|
|
242
|
+
),
|
|
243
|
+
default_prompt_template=(
|
|
244
|
+
"Текст: {text}\nПитање: {question}\nОдговор у максимум 3 речи: {label}"
|
|
245
|
+
),
|
|
246
|
+
default_instruction_prompt=(
|
|
247
|
+
"Текст: {text}\n\n"
|
|
248
|
+
"Одговорите на следеће питање о горњем тексту у максимум 3 речи.\n\n"
|
|
249
|
+
"Питање: {question}"
|
|
250
|
+
),
|
|
251
|
+
default_prompt_label_mapping=dict(),
|
|
252
|
+
),
|
|
253
|
+
SWEDISH: PromptConfig(
|
|
219
254
|
default_prompt_prefix="Nedan följer texter med tillhörande frågor och svar.",
|
|
220
255
|
default_prompt_template="Text: {text}\nFråga: {question}\nSvar på max 3 ord: "
|
|
221
256
|
"{label}",
|
|
@@ -223,4 +258,18 @@ RC_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
223
258
|
"ovan med högst 3 ord.\n\nFråga: {question}",
|
|
224
259
|
default_prompt_label_mapping=dict(),
|
|
225
260
|
),
|
|
261
|
+
UKRAINIAN: PromptConfig(
|
|
262
|
+
default_prompt_prefix=(
|
|
263
|
+
"Нижче наведені тексти з відповідними питаннями та відповідями."
|
|
264
|
+
),
|
|
265
|
+
default_prompt_template=(
|
|
266
|
+
"Текст: {text}\nПитання: {question}\nВідповідь максимум 3 словами: {label}"
|
|
267
|
+
),
|
|
268
|
+
default_instruction_prompt=(
|
|
269
|
+
"Текст: {text}\n\n"
|
|
270
|
+
"Відповідь на наступне питання про вищезазначений текст максимум 3 "
|
|
271
|
+
"словами.\n\nПитання: {question}"
|
|
272
|
+
),
|
|
273
|
+
default_prompt_label_mapping=dict(),
|
|
274
|
+
),
|
|
226
275
|
}
|
|
@@ -4,34 +4,48 @@ import typing as t
|
|
|
4
4
|
|
|
5
5
|
from ..data_models import PromptConfig
|
|
6
6
|
from ..languages import (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
7
|
+
BULGARIAN,
|
|
8
|
+
CZECH,
|
|
9
|
+
DANISH,
|
|
10
|
+
DUTCH,
|
|
11
|
+
ENGLISH,
|
|
12
|
+
ESTONIAN,
|
|
13
|
+
FAROESE,
|
|
14
|
+
FINNISH,
|
|
15
|
+
FRENCH,
|
|
16
|
+
GERMAN,
|
|
17
|
+
GREEK,
|
|
18
|
+
ICELANDIC,
|
|
19
|
+
ITALIAN,
|
|
20
|
+
LATVIAN,
|
|
21
|
+
LITHUANIAN,
|
|
22
|
+
NORWEGIAN,
|
|
23
|
+
NORWEGIAN_BOKMÅL,
|
|
24
|
+
NORWEGIAN_NYNORSK,
|
|
25
|
+
POLISH,
|
|
26
|
+
PORTUGUESE,
|
|
27
|
+
SERBIAN,
|
|
28
|
+
SLOVAK,
|
|
29
|
+
SPANISH,
|
|
30
|
+
SWEDISH,
|
|
31
|
+
UKRAINIAN,
|
|
28
32
|
)
|
|
29
33
|
|
|
30
34
|
if t.TYPE_CHECKING:
|
|
31
|
-
from ..
|
|
35
|
+
from ..languages import Language
|
|
32
36
|
|
|
33
37
|
SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
34
|
-
|
|
38
|
+
BULGARIAN: PromptConfig(
|
|
39
|
+
default_prompt_label_mapping=dict(
|
|
40
|
+
positive="позитивен", neutral="неутрален", negative="негативен"
|
|
41
|
+
),
|
|
42
|
+
default_prompt_prefix="Следват документи и техният сентимент, който може да "
|
|
43
|
+
"бъде{labels_str}.",
|
|
44
|
+
default_prompt_template="Документ: {text}\nСентимент: {label}",
|
|
45
|
+
default_instruction_prompt="Документ: {text}\n\nКласифицирайте сентимента в "
|
|
46
|
+
"документа. Отговорете с {labels_str}, и нищо друго.",
|
|
47
|
+
),
|
|
48
|
+
DANISH: PromptConfig(
|
|
35
49
|
default_prompt_label_mapping=dict(
|
|
36
50
|
positive="positiv", neutral="neutral", negative="negativ"
|
|
37
51
|
),
|
|
@@ -41,7 +55,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
41
55
|
default_instruction_prompt="Dokument: {text}\n\nKlassificer sentimentet i "
|
|
42
56
|
"dokumentet. Svar kun med {labels_str}, og intet andet.",
|
|
43
57
|
),
|
|
44
|
-
|
|
58
|
+
CZECH: PromptConfig(
|
|
45
59
|
default_prompt_label_mapping=dict(
|
|
46
60
|
positive="pozitivní", neutral="neutrální", negative="negativní"
|
|
47
61
|
),
|
|
@@ -51,7 +65,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
51
65
|
default_instruction_prompt="Dokument: {text}\n\nKlasifikujte sentiment v "
|
|
52
66
|
"dokumentu. Odpovězte pouze s {labels_str}, a nic jiného.",
|
|
53
67
|
),
|
|
54
|
-
|
|
68
|
+
GERMAN: PromptConfig(
|
|
55
69
|
default_prompt_label_mapping=dict(
|
|
56
70
|
positive="positiv", neutral="neutral", negative="negativ"
|
|
57
71
|
),
|
|
@@ -61,7 +75,17 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
61
75
|
default_instruction_prompt="Dokument: {text}\n\nKlassifizieren Sie die "
|
|
62
76
|
"Stimmung im Dokument. Antworten Sie mit {labels_str}, und nichts anderes.",
|
|
63
77
|
),
|
|
64
|
-
|
|
78
|
+
GREEK: PromptConfig(
|
|
79
|
+
default_prompt_label_mapping=dict(
|
|
80
|
+
positive="θετικό", neutral="ουδέτερο", negative="αρνητικό"
|
|
81
|
+
),
|
|
82
|
+
default_prompt_prefix="Τα ακόλουθα είναι έγγραφα και το συναίσθημά τους, "
|
|
83
|
+
"το οποίο μπορεί να είναι {labels_str}.",
|
|
84
|
+
default_prompt_template="Έγγραφο: {text}\nΣυναίσθημα: {label}",
|
|
85
|
+
default_instruction_prompt="Έγγραφο: {text}\n\nΤαξινομήστε το συναίσθημα "
|
|
86
|
+
"στο έγγραφο. Απαντήστε με {labels_str}, και τίποτα άλλο.",
|
|
87
|
+
),
|
|
88
|
+
ENGLISH: PromptConfig(
|
|
65
89
|
default_prompt_label_mapping=dict(
|
|
66
90
|
positive="positive", neutral="neutral", negative="negative"
|
|
67
91
|
),
|
|
@@ -71,7 +95,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
71
95
|
default_instruction_prompt="Document: {text}\n\nClassify the sentiment in the "
|
|
72
96
|
"document. Answer with {labels_str}, and nothing else.",
|
|
73
97
|
),
|
|
74
|
-
|
|
98
|
+
SPANISH: PromptConfig(
|
|
75
99
|
default_prompt_label_mapping=dict(
|
|
76
100
|
positive="positivo", neutral="neutral", negative="negativo"
|
|
77
101
|
),
|
|
@@ -81,7 +105,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
81
105
|
default_instruction_prompt="Documento: {text}\n\nClasifica el sentimiento del "
|
|
82
106
|
"documento. Responde con {labels_str}, y nada más.",
|
|
83
107
|
),
|
|
84
|
-
|
|
108
|
+
ESTONIAN: PromptConfig(
|
|
85
109
|
default_prompt_label_mapping=dict(
|
|
86
110
|
positive="positiivne", neutral="neutraalne", negative="negatiivne"
|
|
87
111
|
),
|
|
@@ -92,7 +116,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
92
116
|
"meelestatuse järgi. Võimalikud vastused: {labels_str}. Muud vastused "
|
|
93
117
|
"ei ole lubatud.",
|
|
94
118
|
),
|
|
95
|
-
|
|
119
|
+
POLISH: PromptConfig(
|
|
96
120
|
default_prompt_label_mapping=dict(
|
|
97
121
|
positive="pozytywny", neutral="neutralny", negative="negatywny"
|
|
98
122
|
),
|
|
@@ -106,7 +130,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
106
130
|
"Odpowiedz jednym słowem: {labels_str}."
|
|
107
131
|
),
|
|
108
132
|
),
|
|
109
|
-
|
|
133
|
+
PORTUGUESE: PromptConfig(
|
|
110
134
|
default_prompt_label_mapping=dict(
|
|
111
135
|
positive="positivo", neutral="neutro", negative="negativo"
|
|
112
136
|
),
|
|
@@ -116,7 +140,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
116
140
|
default_instruction_prompt="Documento: {text}\n\nClassifica o "
|
|
117
141
|
"sentimento do documento. Responde apenas com {labels_str}.",
|
|
118
142
|
),
|
|
119
|
-
|
|
143
|
+
FINNISH: PromptConfig(
|
|
120
144
|
default_prompt_label_mapping=dict(
|
|
121
145
|
positive="positiivinen", neutral="neutrali", negative="negatiivinen"
|
|
122
146
|
),
|
|
@@ -126,7 +150,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
126
150
|
default_instruction_prompt="Teksti: {text}\n\nLuokittele arvostelun tunnesävy. "
|
|
127
151
|
"Vastaa vain {labels_str}, ei muuta.",
|
|
128
152
|
),
|
|
129
|
-
|
|
153
|
+
FAROESE: PromptConfig(
|
|
130
154
|
default_prompt_label_mapping=dict(
|
|
131
155
|
positive="positivt", neutral="neutralt", negative="negativt"
|
|
132
156
|
),
|
|
@@ -136,7 +160,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
136
160
|
default_instruction_prompt="Skjal: {text}\n\nFlokka kensluna í skjalinum. "
|
|
137
161
|
"Svara við {labels_str}, og einki annað.",
|
|
138
162
|
),
|
|
139
|
-
|
|
163
|
+
FRENCH: PromptConfig(
|
|
140
164
|
default_prompt_label_mapping=dict(
|
|
141
165
|
positive="positif", neutral="neutre", negative="négatif"
|
|
142
166
|
),
|
|
@@ -146,7 +170,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
146
170
|
default_instruction_prompt="Document: {text}\n\nClassez le sentiment dans le "
|
|
147
171
|
"document. Répondez par {labels_str}, et rien d'autre.",
|
|
148
172
|
),
|
|
149
|
-
|
|
173
|
+
ICELANDIC: PromptConfig(
|
|
150
174
|
default_prompt_label_mapping=dict(
|
|
151
175
|
positive="jákvætt", neutral="hlutlaust", negative="neikvætt"
|
|
152
176
|
),
|
|
@@ -156,7 +180,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
156
180
|
default_instruction_prompt="Textabrot: {text}\n\nGreindu lyndið í "
|
|
157
181
|
"textabrotinu. Svaraðu með {labels_str}, og ekkert annað.",
|
|
158
182
|
),
|
|
159
|
-
|
|
183
|
+
ITALIAN: PromptConfig(
|
|
160
184
|
default_prompt_label_mapping=dict(
|
|
161
185
|
positive="positivo", neutral="neutro", negative="negativo"
|
|
162
186
|
),
|
|
@@ -166,7 +190,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
166
190
|
default_instruction_prompt="Documento: {text}\n\nClassificare il sentiment del "
|
|
167
191
|
"documento. Rispondere con {labels_str}, e nient'altro.",
|
|
168
192
|
),
|
|
169
|
-
|
|
193
|
+
LITHUANIAN: PromptConfig(
|
|
170
194
|
default_prompt_label_mapping=dict(
|
|
171
195
|
positive="teigiamas", neutral="neutralus", negative="neigiamas"
|
|
172
196
|
),
|
|
@@ -176,7 +200,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
176
200
|
default_instruction_prompt="Dokumentas: {text}\n\nKlasifikuokite nuotaiką "
|
|
177
201
|
"dokumente. Atsakykite su {labels_str}, ir nieko kito.",
|
|
178
202
|
),
|
|
179
|
-
|
|
203
|
+
LATVIAN: PromptConfig(
|
|
180
204
|
default_prompt_label_mapping=dict(
|
|
181
205
|
positive="pozitīvs", neutral="neitrāls", negative="negatīvs"
|
|
182
206
|
),
|
|
@@ -186,7 +210,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
186
210
|
default_instruction_prompt="Dokuments: {text}\n\nKlasificējiet noskaņojumu "
|
|
187
211
|
"dokumentā. Atbildiet ar {labels_str}, un neko citu.",
|
|
188
212
|
),
|
|
189
|
-
|
|
213
|
+
NORWEGIAN_BOKMÅL: PromptConfig(
|
|
190
214
|
default_prompt_label_mapping=dict(
|
|
191
215
|
positive="positiv", neutral="nøytral", negative="negativ"
|
|
192
216
|
),
|
|
@@ -196,7 +220,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
196
220
|
default_instruction_prompt="Dokument: {text}\n\nKlassifiser følelsen i "
|
|
197
221
|
"teksten. Svar med {labels_str}, og ikke noe annet.",
|
|
198
222
|
),
|
|
199
|
-
|
|
223
|
+
DUTCH: PromptConfig(
|
|
200
224
|
default_prompt_label_mapping=dict(
|
|
201
225
|
positive="positief", neutral="neutraal", negative="negatief"
|
|
202
226
|
),
|
|
@@ -206,7 +230,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
206
230
|
default_instruction_prompt="Document: {text}\n\nClassificeer het sentiment in "
|
|
207
231
|
"het document. Antwoord met {labels_str}, en verder niets.",
|
|
208
232
|
),
|
|
209
|
-
|
|
233
|
+
NORWEGIAN_NYNORSK: PromptConfig(
|
|
210
234
|
default_prompt_label_mapping=dict(
|
|
211
235
|
positive="positiv", neutral="nøytral", negative="negativ"
|
|
212
236
|
),
|
|
@@ -216,7 +240,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
216
240
|
default_instruction_prompt="Dokument: {text}\n\nKlassifiser følelsen i "
|
|
217
241
|
"teksten. Svar med {labels_str}, og ikke noe annet.",
|
|
218
242
|
),
|
|
219
|
-
|
|
243
|
+
NORWEGIAN: PromptConfig(
|
|
220
244
|
default_prompt_label_mapping=dict(
|
|
221
245
|
positive="positiv", neutral="nøytral", negative="negativ"
|
|
222
246
|
),
|
|
@@ -226,7 +250,7 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
226
250
|
default_instruction_prompt="Dokument: {text}\n\nKlassifiser følelsen i "
|
|
227
251
|
"teksten. Svar med {labels_str}, og ikke noe annet.",
|
|
228
252
|
),
|
|
229
|
-
|
|
253
|
+
SLOVAK: PromptConfig(
|
|
230
254
|
default_prompt_label_mapping=dict(
|
|
231
255
|
positive="pozitívne", neutral="neutrálne", negative="negatívne"
|
|
232
256
|
),
|
|
@@ -236,7 +260,17 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
236
260
|
default_instruction_prompt="Dokument: {text}\n\nKlasifikujte pocit v "
|
|
237
261
|
"dokumente. Odpovedzte so {labels_str}, a nič iné.",
|
|
238
262
|
),
|
|
239
|
-
|
|
263
|
+
SERBIAN: PromptConfig(
|
|
264
|
+
default_prompt_label_mapping=dict(
|
|
265
|
+
positive="pozitivan", neutral="neutralan", negative="negativan"
|
|
266
|
+
),
|
|
267
|
+
default_prompt_prefix="U nastavku su dokumenti i njihov sentiment, koji može "
|
|
268
|
+
"biti {labels_str}.",
|
|
269
|
+
default_prompt_template="Dokument: {text}\nSentiment: {label}",
|
|
270
|
+
default_instruction_prompt="Dokument: {text}\n\nKlasifikujte sentiment u "
|
|
271
|
+
"dokumentu. Odgovorite sa {labels_str}, i ništa drugo.",
|
|
272
|
+
),
|
|
273
|
+
SWEDISH: PromptConfig(
|
|
240
274
|
default_prompt_label_mapping=dict(
|
|
241
275
|
positive="positiv", neutral="neutral", negative="negativ"
|
|
242
276
|
),
|
|
@@ -246,4 +280,18 @@ SENT_TEMPLATES: dict["Language", PromptConfig] = {
|
|
|
246
280
|
default_instruction_prompt="Dokument: {text}\n\nKlassificera känslan i "
|
|
247
281
|
"dokumentet. Svara med {labels_str}, och inget annat.",
|
|
248
282
|
),
|
|
283
|
+
UKRAINIAN: PromptConfig(
|
|
284
|
+
default_prompt_label_mapping=dict(
|
|
285
|
+
positive="позитивний", neutral="нейтральний", negative="негативний"
|
|
286
|
+
),
|
|
287
|
+
default_prompt_prefix=(
|
|
288
|
+
"Нижче наведені документи і їх настрій, який може бути {labels_str}."
|
|
289
|
+
),
|
|
290
|
+
default_prompt_template="Документ: {text}\nНастрій: {label}",
|
|
291
|
+
default_instruction_prompt=(
|
|
292
|
+
"Документ: {text}\n\n"
|
|
293
|
+
"Класифікуйте настрій у документі. "
|
|
294
|
+
"Відповідайте {labels_str}, і нічого більше."
|
|
295
|
+
),
|
|
296
|
+
),
|
|
249
297
|
}
|