gabrielaltay commited on
Commit
378947b
1 Parent(s): 650ab66

only one split, but lets call it train

Browse files
Files changed (1) hide show
  1. hacdc-wikipedia.py +2 -3
hacdc-wikipedia.py CHANGED
@@ -4,7 +4,6 @@ import os
4
 
5
  import datasets
6
  from datasets import Features, Sequence, Value
7
- import orjson
8
 
9
 
10
  logger = datasets.logging.get_logger(__name__)
@@ -144,7 +143,7 @@ class HacdcWikipedia(datasets.GeneratorBasedBuilder):
144
  paths = [os.path.join("data", filename) for filename in _FILES]
145
  downloaded_files = dl_manager.download_and_extract(paths)
146
  return [
147
- datasets.SplitGenerator(name="every", gen_kwargs={"filepaths": downloaded_files}),
148
  ]
149
 
150
 
@@ -160,7 +159,7 @@ class HacdcWikipedia(datasets.GeneratorBasedBuilder):
160
  logger.info("generating examples from = %s", filepath)
161
  with open(filepath, "r") as fp:
162
  for line in fp:
163
- data = orjson.loads(line)
164
 
165
  if self.config.name == "all":
166
  yield _id, data
 
4
 
5
  import datasets
6
  from datasets import Features, Sequence, Value
 
7
 
8
 
9
  logger = datasets.logging.get_logger(__name__)
 
143
  paths = [os.path.join("data", filename) for filename in _FILES]
144
  downloaded_files = dl_manager.download_and_extract(paths)
145
  return [
146
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": downloaded_files}),
147
  ]
148
 
149
 
 
159
  logger.info("generating examples from = %s", filepath)
160
  with open(filepath, "r") as fp:
161
  for line in fp:
162
+ data = json.loads(line)
163
 
164
  if self.config.name == "all":
165
  yield _id, data