Update files from the datasets library (from 1.6.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.6.0
- README.md +1 -1
- discovery.py +2 -5
README.md
CHANGED
@@ -11,7 +11,7 @@ multilinguality:
|
|
11 |
- monolingual
|
12 |
size_categories:
|
13 |
discovery:
|
14 |
-
- n
|
15 |
discoverysmall:
|
16 |
- 10K<n<100K
|
17 |
source_datasets:
|
|
|
11 |
- monolingual
|
12 |
size_categories:
|
13 |
discovery:
|
14 |
+
- 1M<n<10M
|
15 |
discoverysmall:
|
16 |
- 10K<n<100K
|
17 |
source_datasets:
|
discovery.py
CHANGED
@@ -16,14 +16,11 @@
|
|
16 |
# Lint as: python3
|
17 |
"""Discourse marker prediction with 174 different markers"""
|
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 |
|
@@ -289,7 +286,7 @@ class Discovery(datasets.GeneratorBasedBuilder):
|
|
289 |
]
|
290 |
|
291 |
def _info(self):
|
292 |
-
features = {text_feature: datasets.Value("string") for text_feature in
|
293 |
if self.config.label_classes:
|
294 |
features["label"] = datasets.features.ClassLabel(names=self.config.label_classes)
|
295 |
else:
|
@@ -337,7 +334,7 @@ class Discovery(datasets.GeneratorBasedBuilder):
|
|
337 |
reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
|
338 |
|
339 |
for n, row in enumerate(reader):
|
340 |
-
example = {feat: row[col] for feat, col in
|
341 |
example["idx"] = n
|
342 |
|
343 |
if self.config.label_column in row:
|
|
|
16 |
# Lint as: python3
|
17 |
"""Discourse marker prediction with 174 different markers"""
|
18 |
|
|
|
19 |
|
20 |
import csv
|
21 |
import os
|
22 |
import textwrap
|
23 |
|
|
|
|
|
24 |
import datasets
|
25 |
|
26 |
|
|
|
286 |
]
|
287 |
|
288 |
def _info(self):
|
289 |
+
features = {text_feature: datasets.Value("string") for text_feature in self.config.text_features.keys()}
|
290 |
if self.config.label_classes:
|
291 |
features["label"] = datasets.features.ClassLabel(names=self.config.label_classes)
|
292 |
else:
|
|
|
334 |
reader = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
|
335 |
|
336 |
for n, row in enumerate(reader):
|
337 |
+
example = {feat: row[col] for feat, col in self.config.text_features.items()}
|
338 |
example["idx"] = n
|
339 |
|
340 |
if self.config.label_column in row:
|