Skip to content

Commit 9ef750d

Browse files
committed
remove config definitions in conll2000 and crime_and_punish
1 parent 52322cc commit 9ef750d

File tree

4 files changed

+7
-57
lines changed

4 files changed

+7
-57
lines changed

datasets/conll2000/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ language:
44
paperswithcode_id: conll-2000-1
55
pretty_name: CoNLL-2000
66
dataset_infos:
7-
- config_name: conll2000
87
dataset_size: 6558116
98
download_size: 3481560
109
features:

datasets/conll2000/conll2000.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,9 @@
5353
_TEST_FILE = "test.txt"
5454

5555

56-
class Conll2000Config(datasets.BuilderConfig):
57-
"""BuilderConfig for Conll2000"""
58-
59-
def __init__(self, **kwargs):
60-
"""BuilderConfig forConll2000.
61-
62-
Args:
63-
**kwargs: keyword arguments forwarded to super.
64-
"""
65-
super(Conll2000Config, self).__init__(**kwargs)
66-
67-
6856
class Conll2000(datasets.GeneratorBasedBuilder):
6957
"""Conll2000 dataset."""
7058

71-
BUILDER_CONFIGS = [
72-
Conll2000Config(name="conll2000", version=datasets.Version("1.0.0"), description="Conll2000 dataset"),
73-
]
74-
7559
def _info(self):
7660
return datasets.DatasetInfo(
7761
description=_DESCRIPTION,

datasets/crime_and_punish/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ language:
44
paperswithcode_id: null
55
pretty_name: CrimeAndPunish
66
dataset_infos:
7-
- config_name: crime-and-punish
87
dataset_size: 1270540
98
download_size: 1201735
109
features:

datasets/crime_and_punish/crime_and_punish.py

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,7 @@
88
_DATA_URL = "https://raw.githubusercontent.com/patrickvonplaten/datasets/master/crime_and_punishment.txt"
99

1010

11-
class CrimeAndPunishConfig(datasets.BuilderConfig):
12-
"""BuilderConfig for Crime and Punish."""
13-
14-
def __init__(self, data_url, **kwargs):
15-
"""BuilderConfig for BlogAuthorship
16-
17-
Args:
18-
data_url: `string`, url to the dataset (word or raw level)
19-
**kwargs: keyword arguments forwarded to super.
20-
"""
21-
super(CrimeAndPunishConfig, self).__init__(
22-
version=datasets.Version(
23-
"1.0.0",
24-
),
25-
**kwargs,
26-
)
27-
self.data_url = data_url
28-
29-
3011
class CrimeAndPunish(datasets.GeneratorBasedBuilder):
31-
32-
VERSION = datasets.Version("0.1.0")
33-
BUILDER_CONFIGS = [
34-
CrimeAndPunishConfig(
35-
name="crime-and-punish",
36-
data_url=_DATA_URL,
37-
description="word level dataset. No processing is needed other than replacing newlines with <eos> tokens.",
38-
),
39-
]
40-
4112
def _info(self):
4213
return datasets.DatasetInfo(
4314
# This is the description that will appear on the datasets page.
@@ -58,17 +29,14 @@ def _info(self):
5829
def _split_generators(self, dl_manager):
5930
"""Returns SplitGenerators."""
6031

61-
if self.config.name == "crime-and-punish":
62-
data = dl_manager.download_and_extract(self.config.data_url)
32+
data = dl_manager.download_and_extract(_DATA_URL)
6333

64-
return [
65-
datasets.SplitGenerator(
66-
name=datasets.Split.TRAIN,
67-
gen_kwargs={"data_file": data, "split": "train"},
68-
),
69-
]
70-
else:
71-
raise ValueError(f"{self.config.name} does not exist")
34+
return [
35+
datasets.SplitGenerator(
36+
name=datasets.Split.TRAIN,
37+
gen_kwargs={"data_file": data, "split": "train"},
38+
),
39+
]
7240

7341
def _generate_examples(self, data_file, split):
7442

0 commit comments

Comments
 (0)