PereLluis13 commited on
Commit
7d0e865
1 Parent(s): edc4337

use os.path.join

Browse files
Files changed (1) hide show
  1. rebel-dataset.py +4 -4
rebel-dataset.py CHANGED
@@ -4,7 +4,7 @@
4
  from __future__ import absolute_import, division, print_function
5
 
6
  import datasets
7
-
8
  import re
9
  import json
10
  import logging
@@ -82,9 +82,9 @@ class Rebel(datasets.GeneratorBasedBuilder):
82
  data_dir = dl_manager.download_and_extract(_URL)
83
 
84
  return [
85
- datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": data_dir + "/en_train.jsonl"}),
86
- datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": data_dir + "/en_val.jsonl"}),
87
- datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": data_dir + "/en_test.jsonl"}),
88
  ]
89
 
90
  def _generate_examples(self, filepath):
 
4
  from __future__ import absolute_import, division, print_function
5
 
6
  import datasets
7
+ import os
8
  import re
9
  import json
10
  import logging
 
82
  data_dir = dl_manager.download_and_extract(_URL)
83
 
84
  return [
85
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": os.path.join(data_dir, "en_train.jsonl")}),
86
+ datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": os.path.join(data_dir,"en_val.jsonl")}),
87
+ datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": os.path.join(data_dir,"en_test.jsonl")}),
88
  ]
89
 
90
  def _generate_examples(self, filepath):