Update wnli.py
Browse files
wnli.py
CHANGED
@@ -90,20 +90,12 @@ class Winograd(datasets.GeneratorBasedBuilder):
|
|
90 |
logger.info("generating examples from = %s", filepath)
|
91 |
df = pd.read_csv(filepath, sep='\t')
|
92 |
header = df.keys()
|
93 |
-
process_label = {0: "not_entailment", 1: "entailment"}
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
}
|
101 |
-
else:
|
102 |
-
for id_, (ref, sentence1, sentence2) in df.iterrows():
|
103 |
-
yield id_, {
|
104 |
-
"sentence1": sentence1,
|
105 |
-
"sentence2": sentence2,
|
106 |
-
"label": -1,
|
107 |
-
}
|
108 |
|
109 |
|
|
|
90 |
logger.info("generating examples from = %s", filepath)
|
91 |
df = pd.read_csv(filepath, sep='\t')
|
92 |
header = df.keys()
|
93 |
+
process_label = {0: "not_entailment", 1: "entailment", -1:-1}
|
94 |
+
for id_, (ref, sentence1, sentence2, score) in df.iterrows():
|
95 |
+
yield id_, {
|
96 |
+
"sentence1": sentence1,
|
97 |
+
"sentence2": sentence2,
|
98 |
+
"label": process_label[int(score)],
|
99 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
|