Felix commited on
Commit
befc158
1 Parent(s): 310146c

add class label typing to swemnli and swediagnostics

Browse files
Files changed (1) hide show
  1. superlim-2.py +2 -2
superlim-2.py CHANGED
@@ -228,7 +228,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
228
  'domain': datasets.Value("string"),
229
  'premise': datasets.Value("string"),
230
  'hypothesis': datasets.Value("string"),
231
- 'label':datasets.Value("string")
232
  })
233
  elif self.config.name == 'swedn':
234
  features = datasets.Features({
@@ -251,7 +251,7 @@ class SuperLim(datasets.GeneratorBasedBuilder):
251
  "id": datasets.Value("string"),
252
  "premise": datasets.Value("string"),
253
  "hypothesis": datasets.Value("string"),
254
- "label": datasets.Value("string")
255
  })
256
  elif self.config.name == "swepar":
257
  features = datasets.Features({
 
228
  'domain': datasets.Value("string"),
229
  'premise': datasets.Value("string"),
230
  'hypothesis': datasets.Value("string"),
231
+ 'label': datasets.ClassLabel(num_classes=3, names=['entailment', 'contradiction', 'neutral'])
232
  })
233
  elif self.config.name == 'swedn':
234
  features = datasets.Features({
 
251
  "id": datasets.Value("string"),
252
  "premise": datasets.Value("string"),
253
  "hypothesis": datasets.Value("string"),
254
+ "label": datasets.ClassLabel(num_classes=3, names=['entailment', 'contradiction', 'neutral'])
255
  })
256
  elif self.config.name == "swepar":
257
  features = datasets.Features({