Update paws-x-all.py
Browse files- paws-x-all.py +7 -7
paws-x-all.py
CHANGED
@@ -132,23 +132,23 @@ class PAWSX(datasets.GeneratorBasedBuilder):
|
|
132 |
_TEST_FILE_NAME = [os.path.join(data_dir, f"x-final/{l}/test_2k.tsv") for l in _LANGUAGES]
|
133 |
_VAL_FILE_NAME = [os.path.join(data_dir, f"x-final/{l}/dev_2k.tsv") for l in _LANGUAGES]
|
134 |
else:
|
135 |
-
_TEST_FILE_NAME = os.path.join(data_dir, f"x-final/{self.config.name}/test_2k.tsv")
|
136 |
-
_VAL_FILE_NAME = os.path.join(data_dir, f"x-final/{self.config.name}/dev_2k.tsv")
|
137 |
|
138 |
if self.config.name == "en":
|
139 |
-
_TRAIN_FILE_NAME = os.path.join(data_dir, f"x-final/{self.config.name}/train.tsv")
|
140 |
elif self.config.name == "all":
|
141 |
_TRAIN_FILE_NAME = [os.path.join(data_dir, f"x-final/{l}/translated_train.tsv") for l in _LANGUAGES if l != "en"]
|
142 |
_TRAIN_FILE_NAME += [os.path.join(data_dir, f"x-final/en/train.tsv")]
|
143 |
else:
|
144 |
-
_TRAIN_FILE_NAME = os.path.join(data_dir, f"x-final/{self.config.name}/translated_train.tsv")
|
145 |
|
146 |
return [
|
147 |
datasets.SplitGenerator(
|
148 |
name=datasets.Split.TRAIN,
|
149 |
# These kwargs will be passed to _generate_examples
|
150 |
gen_kwargs={
|
151 |
-
"
|
152 |
"split": datasets.Split.TRAIN,
|
153 |
},
|
154 |
),
|
@@ -156,7 +156,7 @@ class PAWSX(datasets.GeneratorBasedBuilder):
|
|
156 |
name=datasets.Split.TEST,
|
157 |
# These kwargs will be passed to _generate_examples
|
158 |
gen_kwargs={
|
159 |
-
"
|
160 |
"split": datasets.Split.TEST,
|
161 |
},
|
162 |
),
|
@@ -164,7 +164,7 @@ class PAWSX(datasets.GeneratorBasedBuilder):
|
|
164 |
name=datasets.Split.VALIDATION,
|
165 |
# These kwargs will be passed to _generate_examples
|
166 |
gen_kwargs={
|
167 |
-
"
|
168 |
"split": datasets.Split.VALIDATION,
|
169 |
},
|
170 |
),
|
|
|
132 |
_TEST_FILE_NAME = [os.path.join(data_dir, f"x-final/{l}/test_2k.tsv") for l in _LANGUAGES]
|
133 |
_VAL_FILE_NAME = [os.path.join(data_dir, f"x-final/{l}/dev_2k.tsv") for l in _LANGUAGES]
|
134 |
else:
|
135 |
+
_TEST_FILE_NAME = [os.path.join(data_dir, f"x-final/{self.config.name}/test_2k.tsv")]
|
136 |
+
_VAL_FILE_NAME = [os.path.join(data_dir, f"x-final/{self.config.name}/dev_2k.tsv")]
|
137 |
|
138 |
if self.config.name == "en":
|
139 |
+
_TRAIN_FILE_NAME = [os.path.join(data_dir, f"x-final/{self.config.name}/train.tsv")]
|
140 |
elif self.config.name == "all":
|
141 |
_TRAIN_FILE_NAME = [os.path.join(data_dir, f"x-final/{l}/translated_train.tsv") for l in _LANGUAGES if l != "en"]
|
142 |
_TRAIN_FILE_NAME += [os.path.join(data_dir, f"x-final/en/train.tsv")]
|
143 |
else:
|
144 |
+
_TRAIN_FILE_NAME = [os.path.join(data_dir, f"x-final/{self.config.name}/translated_train.tsv")]
|
145 |
|
146 |
return [
|
147 |
datasets.SplitGenerator(
|
148 |
name=datasets.Split.TRAIN,
|
149 |
# These kwargs will be passed to _generate_examples
|
150 |
gen_kwargs={
|
151 |
+
"filepaths": _TRAIN_FILE_NAME,
|
152 |
"split": datasets.Split.TRAIN,
|
153 |
},
|
154 |
),
|
|
|
156 |
name=datasets.Split.TEST,
|
157 |
# These kwargs will be passed to _generate_examples
|
158 |
gen_kwargs={
|
159 |
+
"filepaths": _TEST_FILE_NAME,
|
160 |
"split": datasets.Split.TEST,
|
161 |
},
|
162 |
),
|
|
|
164 |
name=datasets.Split.VALIDATION,
|
165 |
# These kwargs will be passed to _generate_examples
|
166 |
gen_kwargs={
|
167 |
+
"filepaths": _VAL_FILE_NAME,
|
168 |
"split": datasets.Split.VALIDATION,
|
169 |
},
|
170 |
),
|