Commit
•
ae61ccb
1
Parent(s):
74f047a
Convert dataset to Parquet (#6)
Browse files- Convert dataset to Parquet (5eeb8763680cd412e873ad985597a25c141124fe)
- Delete loading script (dece673478058a9893a81c6f79ae1b3839b49bd0)
- README.md +8 -3
- climate_fever.py +0 -112
- data/test-00000-of-00001.parquet +3 -0
README.md
CHANGED
@@ -61,10 +61,15 @@ dataset_info:
|
|
61 |
list: string
|
62 |
splits:
|
63 |
- name: test
|
64 |
-
num_bytes:
|
65 |
num_examples: 1535
|
66 |
-
download_size:
|
67 |
-
dataset_size:
|
|
|
|
|
|
|
|
|
|
|
68 |
---
|
69 |
|
70 |
# Dataset Card for ClimateFever
|
|
|
61 |
list: string
|
62 |
splits:
|
63 |
- name: test
|
64 |
+
num_bytes: 2429240
|
65 |
num_examples: 1535
|
66 |
+
download_size: 868947
|
67 |
+
dataset_size: 2429240
|
68 |
+
configs:
|
69 |
+
- config_name: default
|
70 |
+
data_files:
|
71 |
+
- split: test
|
72 |
+
path: data/test-*
|
73 |
---
|
74 |
|
75 |
# Dataset Card for ClimateFever
|
climate_fever.py
DELETED
@@ -1,112 +0,0 @@
|
|
1 |
-
# coding=utf-8
|
2 |
-
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
|
3 |
-
#
|
4 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
-
# you may not use this file except in compliance with the License.
|
6 |
-
# You may obtain a copy of the License at
|
7 |
-
#
|
8 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
-
#
|
10 |
-
# Unless required by applicable law or agreed to in writing, software
|
11 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
-
# See the License for the specific language governing permissions and
|
14 |
-
# limitations under the License.
|
15 |
-
"""A dataset adopting the FEVER methodology that consists of 1,535 real-world claims regarding climate-change collected on the internet."""
|
16 |
-
|
17 |
-
|
18 |
-
import json
|
19 |
-
import os
|
20 |
-
|
21 |
-
import datasets
|
22 |
-
|
23 |
-
|
24 |
-
# Find for instance the citation on arxiv or on the dataset repo/website
|
25 |
-
_CITATION = """\
|
26 |
-
@misc{diggelmann2020climatefever,
|
27 |
-
title={CLIMATE-FEVER: A Dataset for Verification of Real-World Climate Claims},
|
28 |
-
author={Thomas Diggelmann and Jordan Boyd-Graber and Jannis Bulian and Massimiliano Ciaramita and Markus Leippold},
|
29 |
-
year={2020},
|
30 |
-
eprint={2012.00614},
|
31 |
-
archivePrefix={arXiv},
|
32 |
-
primaryClass={cs.CL}
|
33 |
-
}
|
34 |
-
"""
|
35 |
-
|
36 |
-
# You can copy an official description
|
37 |
-
_DESCRIPTION = """\
|
38 |
-
A dataset adopting the FEVER methodology that consists of 1,535 real-world claims regarding climate-change collected on the internet. Each claim is accompanied by five manually annotated evidence sentences retrieved from the English Wikipedia that support, refute or do not give enough information to validate the claim totalling in 7,675 claim-evidence pairs. The dataset features challenging claims that relate multiple facets and disputed cases of claims where both supporting and refuting evidence are present.
|
39 |
-
"""
|
40 |
-
|
41 |
-
# dataset version (corresponds to release on GitHub)
|
42 |
-
_VERSION = "1.0.1"
|
43 |
-
|
44 |
-
# link to an official homepage
|
45 |
-
_HOMEPAGE = "http://climatefever.ai"
|
46 |
-
|
47 |
-
# TODO: Add the licence for the dataset here if you can find it
|
48 |
-
_LICENSE = ""
|
49 |
-
|
50 |
-
# url to dataset release on GitHub
|
51 |
-
_URL = f"https://raw.githubusercontent.com/tdiggelm/climate-fever-dataset/{_VERSION}/dataset/climate-fever.jsonl"
|
52 |
-
|
53 |
-
|
54 |
-
class ClimateFever(datasets.GeneratorBasedBuilder):
|
55 |
-
"""CLIMATE-FEVER: A dataset adopting the FEVER methodology that consists of 1,535 real-world claims regarding climate-change collected on the internet. Each claim is accompanied by five manually annotated evidence sentences retrieved from the English Wikipedia that support, refute or do not give enough information to validate the claim totalling in 7,675 claim-evidence pairs. The dataset features challenging claims that relate multiple facets and disputed cases of claims where both supporting and refuting evidence are present."""
|
56 |
-
|
57 |
-
VERSION = datasets.Version(_VERSION)
|
58 |
-
|
59 |
-
def _info(self):
|
60 |
-
|
61 |
-
features = datasets.Features(
|
62 |
-
{
|
63 |
-
"claim_id": datasets.Value("string"),
|
64 |
-
"claim": datasets.Value("string"),
|
65 |
-
"claim_label": datasets.ClassLabel(names=["SUPPORTS", "REFUTES", "NOT_ENOUGH_INFO", "DISPUTED"]),
|
66 |
-
"evidences": [
|
67 |
-
{
|
68 |
-
"evidence_id": datasets.Value("string"),
|
69 |
-
"evidence_label": datasets.ClassLabel(names=["SUPPORTS", "REFUTES", "NOT_ENOUGH_INFO"]),
|
70 |
-
"article": datasets.Value("string"),
|
71 |
-
"evidence": datasets.Value("string"),
|
72 |
-
"entropy": datasets.Value("float32"),
|
73 |
-
"votes": [datasets.Value("string")],
|
74 |
-
},
|
75 |
-
],
|
76 |
-
}
|
77 |
-
)
|
78 |
-
|
79 |
-
return datasets.DatasetInfo(
|
80 |
-
# This is the description that will appear on the datasets page.
|
81 |
-
description=_DESCRIPTION,
|
82 |
-
# This defines the different columns of the dataset and their types
|
83 |
-
features=features, # Here we define them above because they are different between the two configurations
|
84 |
-
# If there's a common (input, target) tuple from the features,
|
85 |
-
# specify them here. They'll be used if as_supervised=True in
|
86 |
-
# builder.as_dataset.
|
87 |
-
supervised_keys=None,
|
88 |
-
# Homepage of the dataset for documentation
|
89 |
-
homepage=_HOMEPAGE,
|
90 |
-
# License for the dataset if available
|
91 |
-
license=_LICENSE,
|
92 |
-
# Citation for the dataset
|
93 |
-
citation=_CITATION,
|
94 |
-
)
|
95 |
-
|
96 |
-
def _split_generators(self, dl_manager):
|
97 |
-
"""Returns SplitGenerators."""
|
98 |
-
data_path = dl_manager.download(_URL)
|
99 |
-
return [
|
100 |
-
datasets.SplitGenerator(
|
101 |
-
name=datasets.Split.TEST,
|
102 |
-
# These kwargs will be passed to _generate_examples
|
103 |
-
gen_kwargs={"filepath": data_path},
|
104 |
-
),
|
105 |
-
]
|
106 |
-
|
107 |
-
def _generate_examples(self, filepath):
|
108 |
-
"""Yields examples."""
|
109 |
-
with open(filepath, encoding="utf-8") as f:
|
110 |
-
for id_, row in enumerate(f):
|
111 |
-
doc = json.loads(row)
|
112 |
-
yield id_, doc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/test-00000-of-00001.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:35a53b07a01714a097ee65acfd19b51cf0d5d03554add81970fa8116554951b0
|
3 |
+
size 868947
|