Datasets:
Commit
·
9e4b871
1
Parent(s):
2207f36
Update snli-zh.py
Browse files- snli-zh.py +1 -1
snli-zh.py
CHANGED
@@ -93,7 +93,7 @@ class Snli(datasets.GeneratorBasedBuilder):
|
|
93 |
premise = row['sentence1']
|
94 |
hypothesis = row['sentence2']
|
95 |
label = row["gold_label"]
|
96 |
-
if len(premise) > 1 and len(hypothesis) > 1 and label in ["entailment", "neutral", "contradiction"]:
|
97 |
yield c, {
|
98 |
"premise": premise,
|
99 |
"hypothesis": hypothesis,
|
|
|
93 |
premise = row['sentence1']
|
94 |
hypothesis = row['sentence2']
|
95 |
label = row["gold_label"]
|
96 |
+
if premise and len(premise) > 1 and hypothesis and len(hypothesis) > 1 and label in ["entailment", "neutral", "contradiction"]:
|
97 |
yield c, {
|
98 |
"premise": premise,
|
99 |
"hypothesis": hypothesis,
|