Datasets:
Tasks:
Text Classification
Modalities:
Text
Sub-tasks:
multi-class-classification
Languages:
English
Size:
10K - 100K
ArXiv:
License:
Revert "Debug one_stop_english"
Browse filesThis reverts commit b46986be4e3fdb85dabdd81c91f34ecd8aace6d6.
raft.py
CHANGED
@@ -17,7 +17,6 @@ import csv
|
|
17 |
import json
|
18 |
import os
|
19 |
from pathlib import Path
|
20 |
-
from collections import OrderedDict
|
21 |
|
22 |
import datasets
|
23 |
|
@@ -405,7 +404,6 @@ class Raft(datasets.GeneratorBasedBuilder):
|
|
405 |
task = TASKS[self.config.name]
|
406 |
labels = list(task["label_columns"])
|
407 |
|
408 |
-
|
409 |
with open(filepath, encoding="utf-8") as f:
|
410 |
csv_reader = csv.reader(f, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True)
|
411 |
column_names = next(csv_reader)
|
@@ -417,7 +415,4 @@ class Raft(datasets.GeneratorBasedBuilder):
|
|
417 |
if split == "test":
|
418 |
row += ["Unlabeled"] * len(labels)
|
419 |
# dicts don't have inherent ordering in python, right??
|
420 |
-
|
421 |
-
for name, value in zip(column_names, row):
|
422 |
-
examples[name] = value
|
423 |
-
yield id_, examples
|
|
|
17 |
import json
|
18 |
import os
|
19 |
from pathlib import Path
|
|
|
20 |
|
21 |
import datasets
|
22 |
|
|
|
404 |
task = TASKS[self.config.name]
|
405 |
labels = list(task["label_columns"])
|
406 |
|
|
|
407 |
with open(filepath, encoding="utf-8") as f:
|
408 |
csv_reader = csv.reader(f, quotechar='"', delimiter=",", quoting=csv.QUOTE_ALL, skipinitialspace=True)
|
409 |
column_names = next(csv_reader)
|
|
|
415 |
if split == "test":
|
416 |
row += ["Unlabeled"] * len(labels)
|
417 |
# dicts don't have inherent ordering in python, right??
|
418 |
+
yield id_, {name: value for name, value in zip(column_names, row)}
|
|
|
|
|
|