Diwank Singh commited on
Commit
de7acf0
·
1 Parent(s): d2bb24d

Update config file

Browse files

Signed-off-by: Diwank Singh <diwank.singh@gmail.com>

Files changed (1) hide show
  1. hinglish-dump.py +5 -13
hinglish-dump.py CHANGED
@@ -54,22 +54,14 @@ class HinglishDumpDataset(datasets.GeneratorBasedBuilder):
54
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
55
 
56
  urls = _URLS[self.config.name]
57
- data_dir = self.data_dir = dl_manager.download_and_extract([urls])
58
 
59
  return [
60
  datasets.SplitGenerator(
61
- name=datasets.Split.TRAIN,
62
- gen_kwargs={"filepath": os.path.join(data_dir, "data.h5"), "split": "train"},
63
- ),
64
- datasets.SplitGenerator(
65
- name=datasets.Split.VALIDATION,
66
- gen_kwargs={"filepath": os.path.join(data_dir, "data.h5"), "split": "eval"},
67
- ),
68
- datasets.SplitGenerator(
69
- name=datasets.Split.TEST,
70
- gen_kwargs={"filepath": os.path.join(data_dir, "data.h5"), "split": "test"},
71
- ),
72
  ]
73
-
74
  def _generate_examples(self, filepath, split):
75
  return pd.read_hdf(filepath, key=split)
 
54
  # By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
55
 
56
  urls = _URLS[self.config.name]
57
+ data_file = self.data_dir = dl_manager.download_and_extract(urls)
58
 
59
  return [
60
  datasets.SplitGenerator(
61
+ name=getattr(datasets.Split, split.upper()),
62
+ gen_kwargs=dict(filepath=filepath, split=split) )
63
+ for split in ["train", "eval", "test"]
 
 
 
 
 
 
 
 
64
  ]
65
+
66
  def _generate_examples(self, filepath, split):
67
  return pd.read_hdf(filepath, key=split)