Datasets:
script updated
Browse files- csfever_v2.py +26 -1
csfever_v2.py
CHANGED
@@ -50,7 +50,10 @@ _URLS = {
|
|
50 |
"07": {"train": "./07/train.jsonl",
|
51 |
"dev" : "./07/dev.jsonl",
|
52 |
"test": "./07/test.jsonl"},
|
53 |
-
"wiki_pages": "./wiki_pages/wiki_pages.jsonl"
|
|
|
|
|
|
|
54 |
}
|
55 |
|
56 |
_ORIGINAL_DESCRIPTION = ""
|
@@ -100,6 +103,11 @@ class CsFEVERv2(datasets.GeneratorBasedBuilder):
|
|
100 |
version=VERSION,
|
101 |
description=_ORIGINAL_DESCRIPTION
|
102 |
),
|
|
|
|
|
|
|
|
|
|
|
103 |
]
|
104 |
|
105 |
DEFAULT_CONFIG_NAME = "original" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
@@ -118,6 +126,16 @@ class CsFEVERv2(datasets.GeneratorBasedBuilder):
|
|
118 |
# These are the features of your dataset like images, labels ...
|
119 |
}
|
120 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
elif self.config.name == "wiki_pages":
|
122 |
features = datasets.Features(
|
123 |
{
|
@@ -218,6 +236,13 @@ class CsFEVERv2(datasets.GeneratorBasedBuilder):
|
|
218 |
"claim": data_point["claim"],
|
219 |
"evidence": data_point["evidence"],
|
220 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
elif self.config.name == "wiki_pages":
|
222 |
yield key, {
|
223 |
"id": data_point["id"],
|
|
|
50 |
"07": {"train": "./07/train.jsonl",
|
51 |
"dev" : "./07/dev.jsonl",
|
52 |
"test": "./07/test.jsonl"},
|
53 |
+
"wiki_pages": "./wiki_pages/wiki_pages.jsonl",
|
54 |
+
"original_nli": {"train": "./original_nli/train.jsonl",
|
55 |
+
"dev" : "./original_nli/dev.jsonl",
|
56 |
+
"test": "./original_nli/test.jsonl"},
|
57 |
}
|
58 |
|
59 |
_ORIGINAL_DESCRIPTION = ""
|
|
|
103 |
version=VERSION,
|
104 |
description=_ORIGINAL_DESCRIPTION
|
105 |
),
|
106 |
+
datasets.BuilderConfig(
|
107 |
+
name="original_nli",
|
108 |
+
version=VERSION,
|
109 |
+
description=_ORIGINAL_DESCRIPTION
|
110 |
+
),
|
111 |
]
|
112 |
|
113 |
DEFAULT_CONFIG_NAME = "original" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
|
|
126 |
# These are the features of your dataset like images, labels ...
|
127 |
}
|
128 |
)
|
129 |
+
elif self.config.name == "original_nli": # This is the name of the configuration selected in BUILDER_CONFIGS above
|
130 |
+
features = datasets.Features(
|
131 |
+
{
|
132 |
+
"id": datasets.Value("int32"),
|
133 |
+
"label": datasets.ClassLabel(num_classes=3, names=["SUPPORTS", "REFUTES", "NOT ENOUGH INFO"]),
|
134 |
+
"claim": datasets.Value("string"),
|
135 |
+
"evidence": datasets.Value("string"),
|
136 |
+
# These are the features of your dataset like images, labels ...
|
137 |
+
}
|
138 |
+
)
|
139 |
elif self.config.name == "wiki_pages":
|
140 |
features = datasets.Features(
|
141 |
{
|
|
|
236 |
"claim": data_point["claim"],
|
237 |
"evidence": data_point["evidence"],
|
238 |
}
|
239 |
+
elif self.config.name == "original_nli":
|
240 |
+
yield key, {
|
241 |
+
"id": data_point["id"],
|
242 |
+
"label": data_point["label"],
|
243 |
+
"claim": data_point["claim"],
|
244 |
+
"evidence": data_point["evidence"],
|
245 |
+
}
|
246 |
elif self.config.name == "wiki_pages":
|
247 |
yield key, {
|
248 |
"id": data_point["id"],
|