vsty commited on
Commit
b376881
·
verified ·
1 Parent(s): 05b71e2

Update clef24_dataset_en.py

Browse files
Files changed (1) hide show
  1. clef24_dataset_en.py +4 -4
clef24_dataset_en.py CHANGED
@@ -44,19 +44,19 @@ class MultilangDataset(GeneratorBasedBuilder):
44
 
45
  def _split_generators(self, dl_manager):
46
  """Returns SplitGenerators."""
47
- # Assumes your dataset is located in "path/to/dataset"
48
  data_dir = os.path.abspath(".")
49
- splits = ["train", "dev", "dev-test"]
50
 
51
  return [
52
  SplitGenerator(
53
- name=Split.TRAIN,
54
  gen_kwargs={
55
  "filepath": os.path.join(data_dir, f"{split}.tsv"),
56
  "split": split
57
  },
58
  )
59
- for split in splits
60
  ]
61
 
62
  def _generate_examples(self, filepath, split):
 
44
 
45
  def _split_generators(self, dl_manager):
46
  """Returns SplitGenerators."""
47
+ # Assumes your dataset is located in "."
48
  data_dir = os.path.abspath(".")
49
+ splits = {"train": Split.TRAIN, "dev": Split.VALIDATION, "dev-test": Split.TEST}
50
 
51
  return [
52
  SplitGenerator(
53
+ name=splits[split],
54
  gen_kwargs={
55
  "filepath": os.path.join(data_dir, f"{split}.tsv"),
56
  "split": split
57
  },
58
  )
59
+ for split in splits.keys()
60
  ]
61
 
62
  def _generate_examples(self, filepath, split):