Update wnli.py
Browse files
wnli.py
CHANGED
@@ -86,8 +86,9 @@ class Winograd(datasets.GeneratorBasedBuilder):
|
|
86 |
logger.info("generating examples from = %s", filepath)
|
87 |
with open(filepath, encoding="utf-8") as f:
|
88 |
header = next(f)
|
|
|
89 |
process_label = {'0': "not_entailment", '1': "entailment"}
|
90 |
-
for id_, row in enumerate(
|
91 |
if "label" in header:
|
92 |
ref, sentence1, sentence2, score = row[:-1].split('\t')
|
93 |
yield id_, {
|
|
|
86 |
logger.info("generating examples from = %s", filepath)
|
87 |
with open(filepath, encoding="utf-8") as f:
|
88 |
header = next(f)
|
89 |
+
lines = f.readlines()
|
90 |
process_label = {'0': "not_entailment", '1': "entailment"}
|
91 |
+
for id_, row in enumerate(lines):
|
92 |
if "label" in header:
|
93 |
ref, sentence1, sentence2, score = row[:-1].split('\t')
|
94 |
yield id_, {
|