Datasets:

Multilinguality:
translation
Size Categories:
unknown
Language Creators:
crowdsourced
Annotations Creators:
no-annotation
Source Datasets:
original
License:
Muennighoff commited on
Commit
14d37af
1 Parent(s): 73684a4

Update tatoeba_mt.py

Browse files
Files changed (1) hide show
  1. tatoeba_mt.py +18 -18
tatoeba_mt.py CHANGED
@@ -118,28 +118,28 @@ class tatoebaMT(datasets.GeneratorBasedBuilder):
118
 
119
  valid_path = os.path.join("test", f"tatoeba-dev.{lang_pair}.tsv")
120
  if os.path.exists(valid_path):
121
- files["validation"] = test_path
122
 
123
  data_dir = dl_manager.download_and_extract(files)
124
 
125
  output = []
126
- # if os.path.exists(data_dir["test"]):
127
- test = datasets.SplitGenerator(
128
- name=datasets.Split.TEST,
129
- gen_kwargs={
130
- "filepath": data_dir["test"]
131
- }
132
- )
133
- output.append(test)
134
-
135
- #if os.path.exists(data_dir["validation"]):
136
- valid = datasets.SplitGenerator(
137
- name=datasets.Split.VALIDATION,
138
- gen_kwargs={
139
- "filepath": data_dir["validation"]
140
- }
141
- )
142
- output.append(valid)
143
 
144
  return output
145
 
 
118
 
119
  valid_path = os.path.join("test", f"tatoeba-dev.{lang_pair}.tsv")
120
  if os.path.exists(valid_path):
121
+ files["validation"] = valid_path
122
 
123
  data_dir = dl_manager.download_and_extract(files)
124
 
125
  output = []
126
+ if os.path.exists(test_path):
127
+ test = datasets.SplitGenerator(
128
+ name=datasets.Split.TEST,
129
+ gen_kwargs={
130
+ "filepath": data_dir["test"]
131
+ }
132
+ )
133
+ output.append(test)
134
+
135
+ if os.path.exists(valid_path):
136
+ valid = datasets.SplitGenerator(
137
+ name=datasets.Split.VALIDATION,
138
+ gen_kwargs={
139
+ "filepath": data_dir["validation"]
140
+ }
141
+ )
142
+ output.append(valid)
143
 
144
  return output
145