paniniDot commited on
Commit
5eba8a2
1 Parent(s): 3aaa6ba

Update sci_lay.py

Browse files
Files changed (1) hide show
  1. sci_lay.py +7 -2
sci_lay.py CHANGED
@@ -26,7 +26,7 @@ The main objective of the SCILAY dataset is to support the development and evalu
26
  _LICENSE = "Creative Commons Attribution 4.0 International"
27
 
28
  _SPLIT_NAMES = {datasets.Split.TRAIN: "train", datasets.Split.VALIDATION: "validation", datasets.Split.TEST: "test"}
29
- _URL = "https://huggingface.co/datasets/paniniDot/sci_lay/blob/main/data/{version}/{split_name}.zip"
30
 
31
  _DOI = "doi"
32
  _PMCID = "pmcid"
@@ -124,6 +124,7 @@ class SciLay(datasets.GeneratorBasedBuilder):
124
  for split, split_name in _SPLIT_NAMES.items()
125
  }
126
  dl_paths = dl_manager.download_and_extract(urls)
 
127
  paths = {
128
  split: [
129
  dl_manager.iter_files(os.path.join(dl_paths[split], split_name, code)) for code in self.config.journals
@@ -154,4 +155,8 @@ class SciLay(datasets.GeneratorBasedBuilder):
154
  _JOURNAL: json_obj[_JOURNAL],
155
  _TOPICS: json_obj[_TOPICS],
156
  _KEYWORDS: json_obj[_KEYWORDS]
157
- }
 
 
 
 
 
26
  _LICENSE = "Creative Commons Attribution 4.0 International"
27
 
28
  _SPLIT_NAMES = {datasets.Split.TRAIN: "train", datasets.Split.VALIDATION: "validation", datasets.Split.TEST: "test"}
29
+ _URL = "data/{version}/{split_name}.zip"
30
 
31
  _DOI = "doi"
32
  _PMCID = "pmcid"
 
124
  for split, split_name in _SPLIT_NAMES.items()
125
  }
126
  dl_paths = dl_manager.download_and_extract(urls)
127
+ print(dl_paths)
128
  paths = {
129
  split: [
130
  dl_manager.iter_files(os.path.join(dl_paths[split], split_name, code)) for code in self.config.journals
 
155
  _JOURNAL: json_obj[_JOURNAL],
156
  _TOPICS: json_obj[_TOPICS],
157
  _KEYWORDS: json_obj[_KEYWORDS]
158
+ }
159
+
160
+ if __name__ == '__main__':
161
+ scilay = SciLay()
162
+ scilay._split_generators(dl_manager=datasets.DownloadManager())