Datasets:

Modalities:
Text
ArXiv:
Libraries:
Datasets
dibyaaaaax commited on
Commit
b6ed071
1 Parent(s): e300142

Update semeval2017.py

Browse files
Files changed (1) hide show
  1. semeval2017.py +20 -1
semeval2017.py CHANGED
@@ -35,10 +35,13 @@ _LICENSE = ""
35
  # TODO: Add link to the official dataset URLs here
36
 
37
  _URLS = {
38
- "test": "test.jsonl"
 
 
39
  }
40
 
41
 
 
42
  # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
43
  class SemEval2017(datasets.GeneratorBasedBuilder):
44
  """TODO: Short description of my dataset."""
@@ -108,6 +111,14 @@ class SemEval2017(datasets.GeneratorBasedBuilder):
108
 
109
  data_dir = dl_manager.download_and_extract(_URLS)
110
  return [
 
 
 
 
 
 
 
 
111
  datasets.SplitGenerator(
112
  name=datasets.Split.TEST,
113
  # These kwargs will be passed to _generate_examples
@@ -116,6 +127,14 @@ class SemEval2017(datasets.GeneratorBasedBuilder):
116
  "split": "test"
117
  },
118
  ),
 
 
 
 
 
 
 
 
119
  ]
120
 
121
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
 
35
  # TODO: Add link to the official dataset URLs here
36
 
37
  _URLS = {
38
+ "test": "test.jsonl",
39
+ "train": "train.jsonl",
40
+ "valid": "valid.jsonl"
41
  }
42
 
43
 
44
+
45
  # TODO: Name of the dataset usually match the script name with CamelCase instead of snake_case
46
  class SemEval2017(datasets.GeneratorBasedBuilder):
47
  """TODO: Short description of my dataset."""
 
111
 
112
  data_dir = dl_manager.download_and_extract(_URLS)
113
  return [
114
+ datasets.SplitGenerator(
115
+ name=datasets.Split.TRAIN,
116
+ # These kwargs will be passed to _generate_examples
117
+ gen_kwargs={
118
+ "filepath": data_dir['train'],
119
+ "split": "train",
120
+ },
121
+ ),
122
  datasets.SplitGenerator(
123
  name=datasets.Split.TEST,
124
  # These kwargs will be passed to _generate_examples
 
127
  "split": "test"
128
  },
129
  ),
130
+ datasets.SplitGenerator(
131
+ name=datasets.Split.VALIDATION,
132
+ # These kwargs will be passed to _generate_examples
133
+ gen_kwargs={
134
+ "filepath": data_dir['valid'],
135
+ "split": "valid",
136
+ },
137
+ ),
138
  ]
139
 
140
  # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`