Datasets:
updata sweana
Browse files- SuperLim.py +60 -30
- data/SweAna/dev.csv +0 -2
- data/SweAna/train.csv +0 -2
- data/SweDiag/dev.csv +0 -0
- data/SweDiag/train.csv +0 -0
- data/SweFaq/dev.csv +0 -0
- data/SweFaq/train.csv +0 -0
- data/SweFracas/dev.csv +0 -0
- data/SweFracas/train.csv +0 -0
- data/SwePar/dev.csv +0 -0
- data/SwePar/train.csv +0 -0
- data/SweSat/dev.csv +0 -0
- data/SweSat/train.csv +0 -0
- data/SweSim_relatedness/dev.csv +0 -0
- data/SweSim_relatedness/train.csv +0 -0
- data/SweSim_similarity/dev.csv +0 -0
- data/SweSim_similarity/train.csv +0 -0
- data/SweWgr/.~lock.test.csv# +0 -1
- data/SweWgr/dev.csv +0 -0
- data/SweWgr/train.csv +0 -0
- data/SweWic/dev.csv +0 -0
- data/SweWic/train.csv +0 -0
- data/SweWsc/dev.csv +0 -0
- data/SweWsc/train.csv +0 -0
SuperLim.py
CHANGED
@@ -179,6 +179,16 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
179 |
# These are the features of your dataset like images, labels ...
|
180 |
}
|
181 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
else: # This is an example to show how to have different features for "first_domain" and "second_domain"
|
183 |
features = datasets.Features(
|
184 |
{
|
@@ -213,37 +223,49 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
213 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
214 |
#urls = _URLS[self.config.name]
|
215 |
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
return [
|
221 |
-
datasets.SplitGenerator(
|
222 |
-
name=datasets.Split.TRAIN,
|
223 |
-
# These kwargs will be passed to _generate_examples
|
224 |
-
gen_kwargs={
|
225 |
-
"filepath": data_dir_train,
|
226 |
-
"split": "train",
|
227 |
-
},
|
228 |
-
),
|
229 |
-
datasets.SplitGenerator(
|
230 |
-
name=datasets.Split.TEST,
|
231 |
-
# These kwargs will be passed to _generate_examples
|
232 |
-
gen_kwargs={
|
233 |
-
"filepath": data_dir_test,
|
234 |
-
"split": "test"
|
235 |
-
},
|
236 |
-
),
|
237 |
-
datasets.SplitGenerator(
|
238 |
-
name=datasets.Split.VALIDATION,
|
239 |
-
# These kwargs will be passed to _generate_examples
|
240 |
-
gen_kwargs={
|
241 |
-
"filepath": data_dir_dev,
|
242 |
-
"split": "dev",
|
243 |
-
},
|
244 |
-
),
|
245 |
-
]
|
246 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
249 |
def _generate_examples(self, filepath, split):
|
@@ -257,6 +279,14 @@ class SuperLim(datasets.GeneratorBasedBuilder):
|
|
257 |
"original sentence": row["original sentence"],
|
258 |
"corrected sentence": row["corrected sentence"],
|
259 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
else:
|
261 |
yield key, {
|
262 |
"sentence": data["sentence"],
|
|
|
179 |
# These are the features of your dataset like images, labels ...
|
180 |
}
|
181 |
)
|
182 |
+
elif self.config.name == "sweana":
|
183 |
+
features = datasets.Features(
|
184 |
+
{
|
185 |
+
"A": datasets.Value("string"),
|
186 |
+
"B": datasets.Value("string"),
|
187 |
+
"C": datasets.Value("string"),
|
188 |
+
"D": datasets.Value("string"),
|
189 |
+
"relation": datasets.Value("string"),
|
190 |
+
}
|
191 |
+
)
|
192 |
else: # This is an example to show how to have different features for "first_domain" and "second_domain"
|
193 |
features = datasets.Features(
|
194 |
{
|
|
|
223 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
224 |
#urls = _URLS[self.config.name]
|
225 |
|
226 |
+
if self.config.name == "dalaj":
|
227 |
+
data_dir_test = dl_manager.download_and_extract(os.path.join(_URL,_TASKS[self.config.name],"test.csv"))
|
228 |
+
data_dir_train = dl_manager.download_and_extract(os.path.join(_URL,_TASKS[self.config.name],"train.csv"))
|
229 |
+
data_dir_dev = dl_manager.download_and_extract(os.path.join(_URL,_TASKS[self.config.name],"dev.csv"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
+
return [
|
232 |
+
datasets.SplitGenerator(
|
233 |
+
name=datasets.Split.TRAIN,
|
234 |
+
# These kwargs will be passed to _generate_examples
|
235 |
+
gen_kwargs={
|
236 |
+
"filepath": data_dir_train,
|
237 |
+
"split": "train",
|
238 |
+
},
|
239 |
+
),
|
240 |
+
datasets.SplitGenerator(
|
241 |
+
name=datasets.Split.TEST,
|
242 |
+
# These kwargs will be passed to _generate_examples
|
243 |
+
gen_kwargs={
|
244 |
+
"filepath": data_dir_test,
|
245 |
+
"split": "test"
|
246 |
+
},
|
247 |
+
),
|
248 |
+
datasets.SplitGenerator(
|
249 |
+
name=datasets.Split.VALIDATION,
|
250 |
+
# These kwargs will be passed to _generate_examples
|
251 |
+
gen_kwargs={
|
252 |
+
"filepath": data_dir_dev,
|
253 |
+
"split": "dev",
|
254 |
+
},
|
255 |
+
),
|
256 |
+
]
|
257 |
+
else:
|
258 |
+
data_dir_test = dl_manager.download_and_extract(os.path.join(_URL, _TASKS[self.config.name], "test.csv"))
|
259 |
+
return [
|
260 |
+
datasets.SplitGenerator(
|
261 |
+
name=datasets.Split.TEST,
|
262 |
+
# These kwargs will be passed to _generate_examples
|
263 |
+
gen_kwargs={
|
264 |
+
"filepath": data_dir_test,
|
265 |
+
"split": "test"
|
266 |
+
},
|
267 |
+
),
|
268 |
+
]
|
269 |
|
270 |
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
271 |
def _generate_examples(self, filepath, split):
|
|
|
279 |
"original sentence": row["original sentence"],
|
280 |
"corrected sentence": row["corrected sentence"],
|
281 |
}
|
282 |
+
elif self.config.name == "sweana":
|
283 |
+
yield key, {
|
284 |
+
"A": row["A"],
|
285 |
+
"B": row["B"],
|
286 |
+
"C": row["C"],
|
287 |
+
"D": row["D"],
|
288 |
+
"relation": row["relation"],
|
289 |
+
}
|
290 |
else:
|
291 |
yield key, {
|
292 |
"sentence": data["sentence"],
|
data/SweAna/dev.csv
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
A,B,C,D,relation
|
2 |
-
dummy,dummy,dummy,dummy,dummy
|
|
|
|
|
|
data/SweAna/train.csv
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
A,B,C,D,relation
|
2 |
-
dummy,dummy,dummy,dummy,dummy,
|
|
|
|
|
|
data/SweDiag/dev.csv
DELETED
File without changes
|
data/SweDiag/train.csv
DELETED
File without changes
|
data/SweFaq/dev.csv
DELETED
File without changes
|
data/SweFaq/train.csv
DELETED
File without changes
|
data/SweFracas/dev.csv
DELETED
File without changes
|
data/SweFracas/train.csv
DELETED
File without changes
|
data/SwePar/dev.csv
DELETED
File without changes
|
data/SwePar/train.csv
DELETED
File without changes
|
data/SweSat/dev.csv
DELETED
File without changes
|
data/SweSat/train.csv
DELETED
File without changes
|
data/SweSim_relatedness/dev.csv
DELETED
File without changes
|
data/SweSim_relatedness/train.csv
DELETED
File without changes
|
data/SweSim_similarity/dev.csv
DELETED
File without changes
|
data/SweSim_similarity/train.csv
DELETED
File without changes
|
data/SweWgr/.~lock.test.csv#
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
,severin,data,25.01.2022 14:43,file:///home/severin/.config/libreoffice/4;
|
|
|
|
data/SweWgr/dev.csv
DELETED
File without changes
|
data/SweWgr/train.csv
DELETED
File without changes
|
data/SweWic/dev.csv
DELETED
File without changes
|
data/SweWic/train.csv
DELETED
File without changes
|
data/SweWsc/dev.csv
DELETED
File without changes
|
data/SweWsc/train.csv
DELETED
File without changes
|