Robin Kurtz commited on
Commit
7f209de
1 Parent(s): c8e2ca7

labels added

Browse files
Files changed (1) hide show
  1. overlim.py +8 -6
overlim.py CHANGED
@@ -314,20 +314,22 @@ class OverLimConfig(datasets.BuilderConfig):
314
  """
315
  self.full_name = name + "_" + language
316
  super(OverLimConfig,
317
- self).__init__(name=self.full_name , version=datasets.Version("1.0.2"), **kwargs)
318
- self.features = features
319
  self.label_classes = label_classes
320
  self.citation = citation
321
  self.description = description
322
- # self.name = name
323
  self.language = language
 
324
 
325
 
326
 
327
  class OverLim(datasets.GeneratorBasedBuilder):
328
  """OverLim"""
329
 
330
- BUILDER_CONFIGS = [[OverLimConfig(
 
331
  name="boolq",
332
  description=_BOOLQ_DESCRIPTION,
333
  features=["question", "passage"],
@@ -432,8 +434,8 @@ class OverLim(datasets.GeneratorBasedBuilder):
432
  )
433
 
434
  def _split_generators(self, dl_manager):
435
- dl_dir = dl_manager.download_and_extract(os.path.join(_URL, self.config.lang, self.config.data_url))
436
- dl_dir = os.path.join(_URL, self.config.lang, self.config.name)
437
  return [
438
  datasets.SplitGenerator(
439
  name=datasets.Split.TRAIN,
 
314
  """
315
  self.full_name = name + "_" + language
316
  super(OverLimConfig,
317
+ self).__init__(name=self.full_name, version=datasets.Version("1.0.2"), **kwargs)
318
+ self.features = features + ["label"]
319
  self.label_classes = label_classes
320
  self.citation = citation
321
  self.description = description
322
+ self.task_name = name
323
  self.language = language
324
+ self.data_url = _TASKS[name]
325
 
326
 
327
 
328
  class OverLim(datasets.GeneratorBasedBuilder):
329
  """OverLim"""
330
 
331
+ BUILDER_CONFIGS = [[
332
+ OverLimConfig(
333
  name="boolq",
334
  description=_BOOLQ_DESCRIPTION,
335
  features=["question", "passage"],
 
434
  )
435
 
436
  def _split_generators(self, dl_manager):
437
+ dl_dir = dl_manager.download_and_extract(os.path.join(_URL, self.config.language, self.config.data_url))
438
+ dl_dir = os.path.join(dl_dir, self.config.task_name)
439
  return [
440
  datasets.SplitGenerator(
441
  name=datasets.Split.TRAIN,