Datasets:

tiedeman commited on
Commit
537e384
1 Parent(s): a080473

data load script

Browse files
Files changed (1) hide show
  1. tatoeba_mt.py +19 -7
tatoeba_mt.py CHANGED
@@ -117,13 +117,25 @@ class tatoebaMT(datasets.GeneratorBasedBuilder):
117
  data_dir = dl_manager.download_and_extract(files)
118
 
119
  output = []
120
- if os.path.exists(data_dir["test"]):
121
- test = datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": data_dir["test"]})
122
- output.append(test)
123
-
124
- if os.path.exists(data_dir["validation"]):
125
- valid = datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": data_dir["validation"]})
126
- output.append(valid)
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
  return output
129
 
 
117
  data_dir = dl_manager.download_and_extract(files)
118
 
119
  output = []
120
+ # if os.path.exists(data_dir["test"]):
121
+ test = datasets.SplitGenerator(
122
+ name=datasets.Split.TEST,
123
+ gen_kwargs={
124
+ "filepath": data_dir["test"],
125
+ "split": "test"
126
+ }
127
+ )
128
+ output.append(test)
129
+
130
+ # if os.path.exists(data_dir["validation"]):
131
+ valid = datasets.SplitGenerator(
132
+ name=datasets.Split.VALIDATION,
133
+ gen_kwargs={
134
+ "filepath": data_dir["validation"],
135
+ "split": "validation"
136
+ }
137
+ )
138
+ output.append(valid)
139
 
140
  return output
141