Datasets:
Tasks:
Text Classification
Sub-tasks:
multi-class-classification
Languages:
English
Size:
10K<n<100K
License:
Update files from the datasets library (from 1.6.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.6.0
- pragmeval.py +2 -5
pragmeval.py
CHANGED
@@ -16,14 +16,11 @@
|
|
16 |
# Lint as: python3
|
17 |
"""The General Language Understanding Evaluation (Pragmeval) benchmark."""
|
18 |
|
19 |
-
from __future__ import absolute_import, division, print_function
|
20 |
|
21 |
import csv
|
22 |
import os
|
23 |
import textwrap
|
24 |
|
25 |
-
import six
|
26 |
-
|
27 |
import datasets
|
28 |
|
29 |
|
@@ -518,7 +515,7 @@ class Pragmeval(datasets.GeneratorBasedBuilder):
|
|
518 |
]
|
519 |
|
520 |
def _info(self):
|
521 |
-
features = {text_feature: datasets.Value("string") for text_feature in
|
522 |
if self.config.label_classes:
|
523 |
features["label"] = datasets.features.ClassLabel(names=self.config.label_classes)
|
524 |
else:
|
@@ -569,7 +566,7 @@ class Pragmeval(datasets.GeneratorBasedBuilder):
|
|
569 |
|
570 |
for n, row in enumerate(reader):
|
571 |
|
572 |
-
example = {feat: row[col] for feat, col in
|
573 |
example["idx"] = n
|
574 |
|
575 |
if self.config.label_column in row:
|
|
|
16 |
# Lint as: python3
|
17 |
"""The General Language Understanding Evaluation (Pragmeval) benchmark."""
|
18 |
|
|
|
19 |
|
20 |
import csv
|
21 |
import os
|
22 |
import textwrap
|
23 |
|
|
|
|
|
24 |
import datasets
|
25 |
|
26 |
|
|
|
515 |
]
|
516 |
|
517 |
def _info(self):
|
518 |
+
features = {text_feature: datasets.Value("string") for text_feature in self.config.text_features.keys()}
|
519 |
if self.config.label_classes:
|
520 |
features["label"] = datasets.features.ClassLabel(names=self.config.label_classes)
|
521 |
else:
|
|
|
566 |
|
567 |
for n, row in enumerate(reader):
|
568 |
|
569 |
+
example = {feat: row[col] for feat, col in self.config.text_features.items()}
|
570 |
example["idx"] = n
|
571 |
|
572 |
if self.config.label_column in row:
|