Commit ·
fa78e53
verified ·
0
Parent(s):
Duplicate from fever/fever
Browse filesCo-authored-by: Parquet-converter (BOT) <parquet-converter@users.noreply.huggingface.co>
Files changed (3)
- .gitattributesAdded+27
- README.mdAdded+353
- fever.pyAdded+218
123456789101112131415161718192021222324252627*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bin.* filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zstandard filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353---language:- enpaperswithcode_id: feverannotations_creators:- crowdsourcedlanguage_creators:- foundlicense:- cc-by-sa-3.0- gpl-3.0multilinguality:- monolingualpretty_name: FEVERsize_categories:- 100K<n<1Msource_datasets:- extended|wikipediatask_categories:- text-classificationtask_ids: []tags:- knowledge-verificationdataset_info:- config_name: v1.0 features: - name: id dtype: int32 - name: label dtype: string - name: claim dtype: string - name: evidence_annotation_id dtype: int32 - name: evidence_id dtype: int32 - name: evidence_wiki_url dtype: string - name: evidence_sentence_id dtype: int32 splits: - name: train num_bytes: 29591412 num_examples: 311431 - name: labelled_dev num_bytes: 3643157 num_examples: 37566 - name: unlabelled_dev num_bytes: 1548965 num_examples: 19998 - name: unlabelled_test num_bytes: 1617002 num_examples: 19998 - name: paper_dev num_bytes: 1821489 num_examples: 18999 - name: paper_test num_bytes: 1821668 num_examples: 18567 download_size: 44853972 dataset_size: 40043693- config_name: v2.0 features: - name: id dtype: int32 - name: label dtype: string - name: claim dtype: string - name: evidence_annotation_id dtype: int32 - name: evidence_id dtype: int32 - name: evidence_wiki_url dtype: string - name: evidence_sentence_id dtype: int32 splits: - name: validation num_bytes: 306243 num_examples: 2384 download_size: 392466 dataset_size: 306243- config_name: wiki_pages features: - name: id dtype: string - name: text dtype: string - name: lines dtype: string splits: - name: wikipedia_pages num_bytes: 7254115038 num_examples: 5416537 download_size: 1713485474 dataset_size: 7254115038---
# Dataset Card for "fever"
## Table of Contents- [Dataset Description](#dataset-description) - [Dataset Summary](#dataset-summary) - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards) - [Languages](#languages)- [Dataset Structure](#dataset-structure) - [Data Instances](#data-instances) - [Data Fields](#data-fields) - [Data Splits](#data-splits)- [Dataset Creation](#dataset-creation) - [Curation Rationale](#curation-rationale) - [Source Data](#source-data) - [Annotations](#annotations) - [Personal and Sensitive Information](#personal-and-sensitive-information)- [Considerations for Using the Data](#considerations-for-using-the-data) - [Social Impact of Dataset](#social-impact-of-dataset) - [Discussion of Biases](#discussion-of-biases) - [Other Known Limitations](#other-known-limitations)- [Additional Information](#additional-information) - [Dataset Curators](#dataset-curators) - [Licensing Information](#licensing-information) - [Citation Information](#citation-information) - [Contributions](#contributions)
## Dataset Description
- **Homepage:** [https://fever.ai/](https://fever.ai/)- **Repository:** [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)- **Paper:** [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)- **Point of Contact:** [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
### Dataset Summary
With billions of individual pages on the web providing information on almost every conceivable topic, we should havethe ability to collect facts that answer almost every conceivable question. However, only a small fraction of thisinformation is contained in structured sources (Wikidata, Freebase, etc.) – we are therefore limited by our ability totransform free-form text to structured knowledge. There is, however, another problem that has become the focus of a lotof recent research and media coverage: false information coming from unreliable sources.
The FEVER workshops are a venue for work in verifiable knowledge extraction and to stimulate progress in this direction.
- FEVER Dataset: FEVER (Fact Extraction and VERification) consists of 185,445 claims generated by altering sentencesextracted from Wikipedia and subsequently verified without knowledge of the sentence they were derived from. The claimsare classified as Supported, Refuted or NotEnoughInfo. For the first two classes, the annotators also recorded thesentence(s) forming the necessary evidence for their judgment.
- FEVER 2.0 Adversarial Attacks Dataset: The FEVER 2.0 Dataset consists of 1174 claims created by the submissions ofparticipants in the Breaker phase of the 2019 shared task. Participants (Breakers) were tasked with generatingadversarial examples that induce classification errors for the existing systems. Breakers submitted a dataset of up to1000 instances with equal number of instances for each of the three classes (Supported, Refuted NotEnoughInfo). Onlynovel claims (i.e. not contained in the original FEVER dataset) were considered as valid entries to the shared task.The submissions were then manually evaluated for Correctness (grammatical, appropriately labeled and meet the FEVERannotation guidelines requirements).
### Supported Tasks and Leaderboards
The task is verification of textual claims against textual sources.
When compared to textual entailment (TE)/natural language inference, the key difference is that in these tasks thepassage to verify each claim is given, and in recent years it typically consists a single sentence, while inverification systems it is retrieved from a large set of documents in order to form the evidence.
### Languages
The dataset is in English.
## Dataset Structure
### Data Instances
#### v1.0
- **Size of downloaded dataset files:** 44.86 MB- **Size of the generated dataset:** 40.05 MB- **Total amount of disk used:** 84.89 MB
An example of 'train' looks as follows.```'claim': 'Nikolaj Coster-Waldau worked with the Fox Broadcasting Company.', 'evidence_wiki_url': 'Nikolaj_Coster-Waldau', 'label': 'SUPPORTS', 'id': 75397, 'evidence_id': 104971, 'evidence_sentence_id': 7, 'evidence_annotation_id': 92206}```
#### v2.0
- **Size of downloaded dataset files:** 0.39 MB- **Size of the generated dataset:** 0.30 MB- **Total amount of disk used:** 0.70 MB
An example of 'validation' looks as follows.```{'claim': "There is a convicted statutory rapist called Chinatown's writer.", 'evidence_wiki_url': '', 'label': 'NOT ENOUGH INFO', 'id': 500000, 'evidence_id': -1, 'evidence_sentence_id': -1, 'evidence_annotation_id': 269158}```
#### wiki_pages
- **Size of downloaded dataset files:** 1.71 GB- **Size of the generated dataset:** 7.25 GB- **Total amount of disk used:** 8.97 GB
An example of 'wikipedia_pages' looks as follows.```{'text': 'The following are the football -LRB- soccer -RRB- events of the year 1928 throughout the world . ', 'lines': '0\tThe following are the football -LRB- soccer -RRB- events of the year 1928 throughout the world .\n1\t', 'id': '1928_in_association_football'}```
### Data Fields
The data fields are the same among all splits.
#### v1.0
- `id`: a `int32` feature.- `label`: a `string` feature.- `claim`: a `string` feature.- `evidence_annotation_id`: a `int32` feature.- `evidence_id`: a `int32` feature.- `evidence_wiki_url`: a `string` feature.- `evidence_sentence_id`: a `int32` feature.
#### v2.0
- `id`: a `int32` feature.- `label`: a `string` feature.- `claim`: a `string` feature.- `evidence_annotation_id`: a `int32` feature.- `evidence_id`: a `int32` feature.- `evidence_wiki_url`: a `string` feature.- `evidence_sentence_id`: a `int32` feature.
#### wiki_pages
- `id`: a `string` feature.- `text`: a `string` feature.- `lines`: a `string` feature.
### Data Splits
#### v1.0
| | train | unlabelled_dev | labelled_dev | paper_dev | unlabelled_test | paper_test ||------|-------:|---------------:|-------------:|----------:|----------------:|-----------:|| v1.0 | 311431 | 19998 | 37566 | 18999 | 19998 | 18567 |
#### v2.0
| | validation ||------|-----------:|| v2.0 | 2384 |
#### wiki_pages
| | wikipedia_pages ||------------|----------------:|| wiki_pages | 5416537 |
## Dataset Creation
### Curation Rationale
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
### Source Data
#### Initial Data Collection and Normalization
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
#### Who are the source language producers?
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
### Annotations
#### Annotation process
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
#### Who are the annotators?
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
### Personal and Sensitive Information
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
## Considerations for Using the Data
### Social Impact of Dataset
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
### Discussion of Biases
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
### Other Known Limitations
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
## Additional Information
### Dataset Curators
[More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
### Licensing Information
FEVER license:
```These data annotations incorporate material from Wikipedia, which is licensed pursuant to the Wikipedia Copyright Policy. These annotations are made available under the license terms described on the applicable Wikipedia article pages, or, where Wikipedia license terms are unavailable, under the Creative Commons Attribution-ShareAlike License (version 3.0), available at http://creativecommons.org/licenses/by-sa/3.0/ (collectively, the “License Termsâ€). You may not use these files except in compliance with the applicable License Terms.```
### Citation Information
If you use "FEVER Dataset", please cite:```bibtex@inproceedings{Thorne18Fever, author = {Thorne, James and Vlachos, Andreas and Christodoulopoulos, Christos and Mittal, Arpit}, title = {{FEVER}: a Large-scale Dataset for Fact Extraction and {VERification}}, booktitle = {NAACL-HLT}, year = {2018}}```
If you use "FEVER 2.0 Adversarial Attacks Dataset", please cite:```bibtex@inproceedings{Thorne19FEVER2, author = {Thorne, James and Vlachos, Andreas and Cocarascu, Oana and Christodoulopoulos, Christos and Mittal, Arpit}, title = {The {FEVER2.0} Shared Task}, booktitle = {Proceedings of the Second Workshop on {Fact Extraction and VERification (FEVER)}}, year = {2018}}```
### Contributions
Thanks to [@thomwolf](https://github.com/thomwolf), [@lhoestq](https://github.com/lhoestq),[@mariamabarham](https://github.com/mariamabarham), [@lewtun](https://github.com/lewtun),[@albertvillanova](https://github.com/albertvillanova) for adding this dataset.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218# coding=utf-8# Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors.## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.
# Lint as: python3"""FEVER dataset."""
import jsonimport osimport textwrap
import datasets
class FeverConfig(datasets.BuilderConfig): """BuilderConfig for FEVER."""
def __init__(self, homepage: str = None, citation: str = None, base_url: str = None, urls: dict = None, **kwargs): """BuilderConfig for FEVER.
Args: homepage (`str`): Homepage. citation (`str`): Citation reference. base_url (`str`): Data base URL that precedes all data URLs. urls (`dict`): Data URLs (each URL will pe preceded by `base_url`). **kwargs: keyword arguments forwarded to super. """ super().__init__(**kwargs) self.homepage = homepage self.citation = citation self.base_url = base_url self.urls = {key: f"{base_url}/{url}" for key, url in urls.items()}
class Fever(datasets.GeneratorBasedBuilder): """Fact Extraction and VERification Dataset."""
BUILDER_CONFIGS = [ FeverConfig( name="v1.0", version=datasets.Version("1.0.0"), description=textwrap.dedent( "FEVER v1.0\n" "FEVER (Fact Extraction and VERification) consists of 185,445 claims generated by altering sentences " "extracted from Wikipedia and subsequently verified without knowledge of the sentence they were " "derived from. The claims are classified as Supported, Refuted or NotEnoughInfo. For the first two " "classes, the annotators also recorded the sentence(s) forming the necessary evidence for their " "judgment." ), homepage="https://fever.ai/dataset/fever.html", citation=textwrap.dedent( """\ @inproceedings{Thorne18Fever, author = {Thorne, James and Vlachos, Andreas and Christodoulopoulos, Christos and Mittal, Arpit}, title = {{FEVER}: a Large-scale Dataset for Fact Extraction and {VERification}}, booktitle = {NAACL-HLT}, year = {2018} }""" ), base_url="https://fever.ai/download/fever", urls={ datasets.Split.TRAIN: "train.jsonl", "labelled_dev": "shared_task_dev.jsonl", "unlabelled_dev": "shared_task_dev_public.jsonl", "unlabelled_test": "shared_task_test.jsonl", "paper_dev": "paper_dev.jsonl", "paper_test": "paper_test.jsonl", }, ), FeverConfig( name="v2.0", version=datasets.Version("2.0.0"), description=textwrap.dedent( "FEVER v2.0:\n" "The FEVER 2.0 Dataset consists of 1174 claims created by the submissions of participants in the " "Breaker phase of the 2019 shared task. Participants (Breakers) were tasked with generating " "adversarial examples that induce classification errors for the existing systems. Breakers submitted " "a dataset of up to 1000 instances with equal number of instances for each of the three classes " "(Supported, Refuted NotEnoughInfo). Only novel claims (i.e. not contained in the original FEVER " "dataset) were considered as valid entries to the shared task. The submissions were then manually " "evaluated for Correctness (grammatical, appropriately labeled and meet the FEVER annotation " "guidelines requirements)." ), homepage="https://fever.ai/dataset/adversarial.html", citation=textwrap.dedent( """\ @inproceedings{Thorne19FEVER2, author = {Thorne, James and Vlachos, Andreas and Cocarascu, Oana and Christodoulopoulos, Christos and Mittal, Arpit}, title = {The {FEVER2.0} Shared Task}, booktitle = {Proceedings of the Second Workshop on {Fact Extraction and VERification (FEVER)}}, year = {2018} }""" ), base_url="https://fever.ai/download/fever2.0", urls={ datasets.Split.VALIDATION: "fever2-fixers-dev.jsonl", }, ), FeverConfig( name="wiki_pages", version=datasets.Version("1.0.0"), description=textwrap.dedent( "Wikipedia pages for FEVER v1.0:\n" "FEVER (Fact Extraction and VERification) consists of 185,445 claims generated by altering sentences " "extracted from Wikipedia and subsequently verified without knowledge of the sentence they were " "derived from. The claims are classified as Supported, Refuted or NotEnoughInfo. For the first two " "classes, the annotators also recorded the sentence(s) forming the necessary evidence for their " "judgment." ), homepage="https://fever.ai/dataset/fever.html", citation=textwrap.dedent( """\ @inproceedings{Thorne18Fever, author = {Thorne, James and Vlachos, Andreas and Christodoulopoulos, Christos and Mittal, Arpit}, title = {{FEVER}: a Large-scale Dataset for Fact Extraction and {VERification}}, booktitle = {NAACL-HLT}, year = {2018} }""" ), base_url="https://fever.ai/download/fever", urls={ "wikipedia_pages": "wiki-pages.zip", }, ), ]
def _info(self): if self.config.name == "wiki_pages": features = { "id": datasets.Value("string"), "text": datasets.Value("string"), "lines": datasets.Value("string"), } elif self.config.name == "v1.0" or self.config.name == "v2.0": features = { "id": datasets.Value("int32"), "label": datasets.Value("string"), "claim": datasets.Value("string"), "evidence_annotation_id": datasets.Value("int32"), "evidence_id": datasets.Value("int32"), "evidence_wiki_url": datasets.Value("string"), "evidence_sentence_id": datasets.Value("int32"), } return datasets.DatasetInfo( description=self.config.description, features=datasets.Features(features), homepage=self.config.homepage, citation=self.config.citation, )
def _split_generators(self, dl_manager): """Returns SplitGenerators.""" dl_paths = dl_manager.download_and_extract(self.config.urls) return [ datasets.SplitGenerator( name=split, gen_kwargs={ "filepath": dl_paths[split] if self.config.name != "wiki_pages" else dl_manager.iter_files(os.path.join(dl_paths[split], "wiki-pages")), }, ) for split in dl_paths.keys() ]
def _generate_examples(self, filepath): """Yields examples.""" if self.config.name == "v1.0" or self.config.name == "v2.0": with open(filepath, encoding="utf-8") as f: for row_id, row in enumerate(f): data = json.loads(row) id_ = data["id"] label = data.get("label", "") claim = data["claim"] evidences = data.get("evidence", []) if len(evidences) > 0: for i in range(len(evidences)): for j in range(len(evidences[i])): annot_id = evidences[i][j][0] if evidences[i][j][0] else -1 evidence_id = evidences[i][j][1] if evidences[i][j][1] else -1 wiki_url = evidences[i][j][2] if evidences[i][j][2] else "" sent_id = evidences[i][j][3] if evidences[i][j][3] else -1 yield str(row_id) + "_" + str(i) + "_" + str(j), { "id": id_, "label": label, "claim": claim, "evidence_annotation_id": annot_id, "evidence_id": evidence_id, "evidence_wiki_url": wiki_url, "evidence_sentence_id": sent_id, } else: yield row_id, { "id": id_, "label": label, "claim": claim, "evidence_annotation_id": -1, "evidence_id": -1, "evidence_wiki_url": "", "evidence_sentence_id": -1, } elif self.config.name == "wiki_pages": for file_id, file in enumerate(filepath): with open(file, encoding="utf-8") as f: for row_id, row in enumerate(f): data = json.loads(row) yield f"{file_id}_{row_id}", data.gitattributesAdded+27
README.mdAdded+353
fever.pyAdded+218