Update wnli.py
Browse files
wnli.py
CHANGED
@@ -20,9 +20,9 @@ _HOMEPAGE = """https://cs.nyu.edu/~davise/papers/WinogradSchemas/WS.html"""
|
|
20 |
|
21 |
# TODO: upload datasets to github
|
22 |
_URL = "./"
|
23 |
-
_TRAINING_FILE = "wnli-train-es.
|
24 |
-
_DEV_FILE = "wnli-dev-es.
|
25 |
-
_TEST_FILE = "wnli-test-shuffled-es.
|
26 |
|
27 |
|
28 |
class WinogradConfig(datasets.BuilderConfig):
|
@@ -88,7 +88,7 @@ class Winograd(datasets.GeneratorBasedBuilder):
|
|
88 |
def _generate_examples(self, filepath):
|
89 |
"""This function returns the examples in the raw (text) form."""
|
90 |
logger.info("generating examples from = %s", filepath)
|
91 |
-
df = pd.read_csv(filepath
|
92 |
header = df.keys()
|
93 |
process_label = {0: "not_entailment", 1: "entailment", -1:-1}
|
94 |
for id_, (ref, sentence1, sentence2, score) in df.iterrows():
|
|
|
20 |
|
21 |
# TODO: upload datasets to github
|
22 |
_URL = "./"
|
23 |
+
_TRAINING_FILE = "wnli-train-es.csv"
|
24 |
+
_DEV_FILE = "wnli-dev-es.csv"
|
25 |
+
_TEST_FILE = "wnli-test-shuffled-es.csv"
|
26 |
|
27 |
|
28 |
class WinogradConfig(datasets.BuilderConfig):
|
|
|
88 |
def _generate_examples(self, filepath):
|
89 |
"""This function returns the examples in the raw (text) form."""
|
90 |
logger.info("generating examples from = %s", filepath)
|
91 |
+
df = pd.read_csv(filepath)
|
92 |
header = df.keys()
|
93 |
process_label = {0: "not_entailment", 1: "entailment", -1:-1}
|
94 |
for id_, (ref, sentence1, sentence2, score) in df.iterrows():
|