qanastek commited on
Commit
f83460a
1 Parent(s): 0cc2eb0

Upload 3 files

Browse files
Files changed (1) hide show
  1. Biosses-BLUE.py +11 -5
Biosses-BLUE.py CHANGED
@@ -92,34 +92,40 @@ class Biosses(datasets.GeneratorBasedBuilder):
92
  def _split_generators(self, dl_manager):
93
  """Returns SplitGenerators."""
94
 
 
95
  archive = dl_manager.download_and_extract(_URL)
96
 
97
  return [
98
  datasets.SplitGenerator(
99
  name=datasets.Split.TRAIN,
100
  gen_kwargs={
101
- "corpus_path": archive,
 
102
  "split": "train",
103
  },
104
  ),
105
  datasets.SplitGenerator(
106
  name=datasets.Split.VALIDATION,
107
  gen_kwargs={
108
- "corpus_path": archive,
 
109
  "split": "dev",
110
  },
111
  ),
112
  datasets.SplitGenerator(
113
  name=datasets.Split.TEST,
114
  gen_kwargs={
115
- "corpus_path": archive,
 
116
  "split": "test",
117
  },
118
  ),
119
  ]
120
- def _generate_examples(self, corpus_path: Path, split: str):
121
 
122
- df = pd.read_csv(f"{corpus_path}/data/BIOSSES/{split}.tsv", sep="\t")
 
 
 
123
 
124
  for index, r in df.iterrows():
125
 
 
92
  def _split_generators(self, dl_manager):
93
  """Returns SplitGenerators."""
94
 
95
+ # archive = dl_manager.download(_URL)
96
  archive = dl_manager.download_and_extract(_URL)
97
 
98
  return [
99
  datasets.SplitGenerator(
100
  name=datasets.Split.TRAIN,
101
  gen_kwargs={
102
+ # "files": dl_manager.iter_archive(archive),
103
+ "path": archive,
104
  "split": "train",
105
  },
106
  ),
107
  datasets.SplitGenerator(
108
  name=datasets.Split.VALIDATION,
109
  gen_kwargs={
110
+ # "files": dl_manager.iter_archive(archive),
111
+ "path": archive,
112
  "split": "dev",
113
  },
114
  ),
115
  datasets.SplitGenerator(
116
  name=datasets.Split.TEST,
117
  gen_kwargs={
118
+ # "files": dl_manager.iter_archive(archive),
119
+ "path": archive,
120
  "split": "test",
121
  },
122
  ),
123
  ]
 
124
 
125
+ # def _generate_examples(self, files, split: str):
126
+ def _generate_examples(self, path: Path, split: str):
127
+
128
+ df = pd.read_csv(f"{path}/data/BIOSSES/{split}.tsv", sep="\t")
129
 
130
  for index, r in df.iterrows():
131