maximedb commited on
Commit
7e96a0e
·
1 Parent(s): b7831a3

Update paws-x-all.py

Browse files
Files changed (1) hide show
  1. paws-x-all.py +11 -11
paws-x-all.py CHANGED
@@ -170,15 +170,15 @@ class PAWSX(datasets.GeneratorBasedBuilder):
170
  ),
171
  ]
172
 
173
- def _generate_examples(self, filepath, split):
174
  """Yields examples."""
175
-
176
- with open(filepath, encoding="utf-8") as f:
177
- data = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
178
- for id_, row in enumerate(data):
179
- yield id_, {
180
- "id": row["id"],
181
- "sentence1": row["sentence1"],
182
- "sentence2": row["sentence2"],
183
- "label": row["label"],
184
- }
 
170
  ),
171
  ]
172
 
173
+ def _generate_examples(self, filepaths, split):
174
  """Yields examples."""
175
+ for f_id_, filepath in enumerate(filepaths):
176
+ with open(filepath, encoding="utf-8") as f:
177
+ data = csv.DictReader(f, delimiter="\t", quoting=csv.QUOTE_NONE)
178
+ for id_, row in enumerate(data):
179
+ yield f"{id_}{f_id_}", {
180
+ "id": row["id"],
181
+ "sentence1": row["sentence1"],
182
+ "sentence2": row["sentence2"],
183
+ "label": row["label"],
184
+ }