albertvillanova HF staff commited on
Commit
dece673
1 Parent(s): 5eeb876

Delete loading script

Browse files
Files changed (1) hide show
  1. climate_fever.py +0 -112
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