Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
10K<n<100K
Language Creators:
found
Annotations Creators:
expert-generated
Source Datasets:
original
ArXiv:
Tags:
fake-news-detection
License:
system HF staff commited on
Commit
1fb0ff9
0 Parent(s):

Update files from the datasets library (from 1.2.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.2.0

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +137 -0
  3. dataset_infos.json +1 -0
  4. dummy/1.0.0/dummy_data.zip +3 -0
  5. liar.py +139 -0
.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - unknown
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - text-classification
18
+ task_ids:
19
+ - text-classification-other-fake-news-detection
20
+ ---
21
+
22
+ # Dataset Card for [Dataset Name]
23
+
24
+ ## Table of Contents
25
+ - [Dataset Description](#dataset-description)
26
+ - [Dataset Summary](#dataset-summary)
27
+ - [Supported Tasks](#supported-tasks-and-leaderboards)
28
+ - [Languages](#languages)
29
+ - [Dataset Structure](#dataset-structure)
30
+ - [Data Instances](#data-instances)
31
+ - [Data Fields](#data-instances)
32
+ - [Data Splits](#data-instances)
33
+ - [Dataset Creation](#dataset-creation)
34
+ - [Curation Rationale](#curation-rationale)
35
+ - [Source Data](#source-data)
36
+ - [Annotations](#annotations)
37
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
38
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
39
+ - [Social Impact of Dataset](#social-impact-of-dataset)
40
+ - [Discussion of Biases](#discussion-of-biases)
41
+ - [Other Known Limitations](#other-known-limitations)
42
+ - [Additional Information](#additional-information)
43
+ - [Dataset Curators](#dataset-curators)
44
+ - [Licensing Information](#licensing-information)
45
+ - [Citation Information](#citation-information)
46
+
47
+ ## Dataset Description
48
+
49
+ - **Homepage:** https://sites.cs.ucsb.edu/~william/
50
+ - **Repository:**
51
+ - **Paper:** https://arxiv.org/abs/1705.00648
52
+ - **Leaderboard:**
53
+ - **Point of Contact:**
54
+
55
+ ### Dataset Summary
56
+
57
+ LIAR is a dataset for fake news detection with 12.8K human labeled short statements from politifact.com's API, and each statement is evaluated by a politifact.com editor for its truthfulness. The distribution of labels in the LIAR dataset is relatively well-balanced: except for 1,050 pants-fire cases, the instances for all other labels range from 2,063 to 2,638. In each case, the labeler provides a lengthy analysis report to ground each judgment.
58
+
59
+ ### Supported Tasks and Leaderboards
60
+
61
+ [More Information Needed]
62
+
63
+ ### Languages
64
+
65
+ English.
66
+
67
+ ## Dataset Structure
68
+
69
+ ### Data Instances
70
+
71
+ [More Information Needed]
72
+
73
+ ### Data Fields
74
+
75
+ [More Information Needed]
76
+
77
+ ### Data Splits
78
+
79
+ [More Information Needed]
80
+
81
+ ## Dataset Creation
82
+
83
+ ### Curation Rationale
84
+
85
+ [More Information Needed]
86
+
87
+ ### Source Data
88
+
89
+ #### Initial Data Collection and Normalization
90
+
91
+ [More Information Needed]
92
+
93
+ #### Who are the source language producers?
94
+
95
+ [More Information Needed]
96
+
97
+ ### Annotations
98
+
99
+ #### Annotation process
100
+
101
+ [More Information Needed]
102
+
103
+ #### Who are the annotators?
104
+
105
+ [More Information Needed]
106
+
107
+ ### Personal and Sensitive Information
108
+
109
+ [More Information Needed]
110
+
111
+ ## Considerations for Using the Data
112
+
113
+ ### Social Impact of Dataset
114
+
115
+ [More Information Needed]
116
+
117
+ ### Discussion of Biases
118
+
119
+ [More Information Needed]
120
+
121
+ ### Other Known Limitations
122
+
123
+ [More Information Needed]
124
+
125
+ ## Additional Information
126
+
127
+ ### Dataset Curators
128
+
129
+ [More Information Needed]
130
+
131
+ ### Licensing Information
132
+
133
+ [More Information Needed]
134
+
135
+ ### Citation Information
136
+
137
+ [More Information Needed]
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "LIAR is a dataset for fake news detection with 12.8K human labeled short statements from politifact.com's API, and each statement is evaluated by a politifact.com editor for its truthfulness. The distribution of labels in the LIAR dataset is relatively well-balanced: except for 1,050 pants-fire cases, the instances for all other labels range from 2,063 to 2,638. In each case, the labeler provides a lengthy analysis report to ground each judgment.\n", "citation": "@inproceedings{wang-2017-liar,\ntitle = \"{``}Liar, Liar Pants on Fire{''}: A New Benchmark Dataset for Fake News Detection\",\nauthor = \"Wang, William Yang\",\nbooktitle = \"Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)\",\nmonth = jul,\nyear = \"2017\",\naddress = \"Vancouver, Canada\",\npublisher = \"Association for Computational Linguistics\",\nurl = \"https://www.aclweb.org/anthology/P17-2067\",\ndoi = \"10.18653/v1/P17-2067\",\npages = \"422--426\",\nabstract = \"Automatic fake news detection is a challenging problem in deception detection, and it has tremendous real-world political and social impacts. However, statistical approaches to combating fake news has been dramatically limited by the lack of labeled benchmark datasets. In this paper, we present LIAR: a new, publicly available dataset for fake news detection. We collected a decade-long, 12.8K manually labeled short statements in various contexts from PolitiFact.com, which provides detailed analysis report and links to source documents for each case. This dataset can be used for fact-checking research as well. Notably, this new dataset is an order of magnitude larger than previously largest public fake news datasets of similar type. Empirically, we investigate automatic fake news detection based on surface-level linguistic patterns. We have designed a novel, hybrid convolutional neural network to integrate meta-data with text. We show that this hybrid approach can improve a text-only deep learning model.\",\n}\n", "homepage": "https://www.aclweb.org/anthology/P17-2067", "license": "Unknown", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 6, "names": ["false", "half-true", "mostly-true", "true", "barely-true", "pants-fire"], "names_file": null, "id": null, "_type": "ClassLabel"}, "statement": {"dtype": "string", "id": null, "_type": "Value"}, "subject": {"dtype": "string", "id": null, "_type": "Value"}, "speaker": {"dtype": "string", "id": null, "_type": "Value"}, "job_title": {"dtype": "string", "id": null, "_type": "Value"}, "state_info": {"dtype": "string", "id": null, "_type": "Value"}, "party_affiliation": {"dtype": "string", "id": null, "_type": "Value"}, "barely_true_counts": {"dtype": "float32", "id": null, "_type": "Value"}, "false_counts": {"dtype": "float32", "id": null, "_type": "Value"}, "half_true_counts": {"dtype": "float32", "id": null, "_type": "Value"}, "mostly_true_counts": {"dtype": "float32", "id": null, "_type": "Value"}, "pants_on_fire_counts": {"dtype": "float32", "id": null, "_type": "Value"}, "context": {"dtype": "string", "id": null, "_type": "Value"}}, "post_processed": null, "supervised_keys": {"input": "statement", "output": "label"}, "builder_name": "liar", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 2730651, "num_examples": 10269, "dataset_name": "liar"}, "test": {"name": "test", "num_bytes": 341414, "num_examples": 1283, "dataset_name": "liar"}, "validation": {"name": "validation", "num_bytes": 341592, "num_examples": 1284, "dataset_name": "liar"}}, "download_checksums": {"https://www.cs.ucsb.edu/~william/data/liar_dataset.zip": {"num_bytes": 1013571, "checksum": "611c1addad919743dde15822b87a60bfb760d8f85597f25289e34621800654c7"}}, "download_size": 1013571, "post_processing_size": null, "dataset_size": 3413657, "size_in_bytes": 4427228}}
dummy/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ce076192e9e166f083e6e0045de9109a5d3ff94690a2163195063bf1dc568ad
3
+ size 2662
liar.py ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """LIAR is a dataset for fake news detection with annotated claims."""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import csv
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @inproceedings{wang-2017-liar,
27
+ title = "{``}Liar, Liar Pants on Fire{''}: A New Benchmark Dataset for Fake News Detection",
28
+ author = "Wang, William Yang",
29
+ booktitle = "Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)",
30
+ month = jul,
31
+ year = "2017",
32
+ address = "Vancouver, Canada",
33
+ publisher = "Association for Computational Linguistics",
34
+ url = "https://www.aclweb.org/anthology/P17-2067",
35
+ doi = "10.18653/v1/P17-2067",
36
+ pages = "422--426",
37
+ abstract = "Automatic fake news detection is a challenging problem in deception detection, and it has tremendous real-world political and social impacts. However, statistical approaches to combating fake news has been dramatically limited by the lack of labeled benchmark datasets. In this paper, we present LIAR: a new, publicly available dataset for fake news detection. We collected a decade-long, 12.8K manually labeled short statements in various contexts from PolitiFact.com, which provides detailed analysis report and links to source documents for each case. This dataset can be used for fact-checking research as well. Notably, this new dataset is an order of magnitude larger than previously largest public fake news datasets of similar type. Empirically, we investigate automatic fake news detection based on surface-level linguistic patterns. We have designed a novel, hybrid convolutional neural network to integrate meta-data with text. We show that this hybrid approach can improve a text-only deep learning model.",
38
+ }
39
+ """
40
+
41
+ _DESCRIPTION = """\
42
+ LIAR is a dataset for fake news detection with 12.8K human labeled short statements from politifact.com's API, and each statement is evaluated by a politifact.com editor for its truthfulness. The distribution of labels in the LIAR dataset is relatively well-balanced: except for 1,050 pants-fire cases, the instances for all other labels range from 2,063 to 2,638. In each case, the labeler provides a lengthy analysis report to ground each judgment.
43
+ """
44
+
45
+ _HOMEPAGE = "https://www.aclweb.org/anthology/P17-2067"
46
+
47
+ _LICENSE = "Unknown"
48
+
49
+ _URL = "https://www.cs.ucsb.edu/~william/data/liar_dataset.zip"
50
+
51
+
52
+ class Liar(datasets.GeneratorBasedBuilder):
53
+ """LIAR is a dataset for fake news detection with annotated claims."""
54
+
55
+ VERSION = datasets.Version("1.0.0")
56
+
57
+ def _info(self):
58
+ return datasets.DatasetInfo(
59
+ description=_DESCRIPTION,
60
+ features=datasets.Features(
61
+ {
62
+ "id": datasets.Value("string"),
63
+ "label": datasets.ClassLabel(
64
+ names=[
65
+ "false",
66
+ "half-true",
67
+ "mostly-true",
68
+ "true",
69
+ "barely-true",
70
+ "pants-fire",
71
+ ]
72
+ ),
73
+ "statement": datasets.Value("string"),
74
+ "subject": datasets.Value("string"),
75
+ "speaker": datasets.Value("string"),
76
+ "job_title": datasets.Value("string"),
77
+ "state_info": datasets.Value("string"),
78
+ "party_affiliation": datasets.Value("string"),
79
+ "barely_true_counts": datasets.Value("float"),
80
+ "false_counts": datasets.Value("float"),
81
+ "half_true_counts": datasets.Value("float"),
82
+ "mostly_true_counts": datasets.Value("float"),
83
+ "pants_on_fire_counts": datasets.Value("float"),
84
+ "context": datasets.Value("string"),
85
+ }
86
+ ),
87
+ supervised_keys=("statement", "label"),
88
+ homepage=_HOMEPAGE,
89
+ license=_LICENSE,
90
+ citation=_CITATION,
91
+ )
92
+
93
+ def _split_generators(self, dl_manager):
94
+ """Returns SplitGenerators."""
95
+
96
+ data_dir = dl_manager.download_and_extract(_URL)
97
+ return [
98
+ datasets.SplitGenerator(
99
+ name=datasets.Split.TRAIN,
100
+ gen_kwargs={
101
+ "filepath": os.path.join(data_dir, "train.tsv"),
102
+ "split": "train",
103
+ },
104
+ ),
105
+ datasets.SplitGenerator(
106
+ name=datasets.Split.TEST,
107
+ gen_kwargs={"filepath": os.path.join(data_dir, "test.tsv"), "split": "test"},
108
+ ),
109
+ datasets.SplitGenerator(
110
+ name=datasets.Split.VALIDATION,
111
+ gen_kwargs={
112
+ "filepath": os.path.join(data_dir, "valid.tsv"),
113
+ "split": "valid",
114
+ },
115
+ ),
116
+ ]
117
+
118
+ def _generate_examples(self, filepath, split):
119
+ """ Yields examples. """
120
+
121
+ with open(filepath, encoding="utf-8") as tsv_file:
122
+ reader = csv.reader(tsv_file, delimiter="\t", quoting=csv.QUOTE_NONE)
123
+ for id_, row in enumerate(reader):
124
+ yield id_, {
125
+ "id": row[0],
126
+ "label": row[1],
127
+ "statement": row[2],
128
+ "subject": row[3],
129
+ "speaker": row[4],
130
+ "job_title": row[5],
131
+ "state_info": row[6],
132
+ "party_affiliation": row[7],
133
+ "barely_true_counts": row[8],
134
+ "false_counts": row[9],
135
+ "half_true_counts": row[10],
136
+ "mostly_true_counts": row[11],
137
+ "pants_on_fire_counts": row[12],
138
+ "context": row[13],
139
+ }