LIAR Dataset

Estimated reading: 4 minutes 169 views

LIAR dataset

What is LIAR Dataset?

LIAR Dataset, a new fake news detection dataset that includes 12.8 thousand short phrases labeled by hand for honesty, topic, context/place, speaker, status, party, and past date. The dataset contains short, decade-old statements in various contexts from politifact.com, which gives a complete analysis report and links to source documentation for each case. This dataset can make the development of fake news detection ML algorithms easier. The dataset can also be used for stance classification, argument mining, topic modeling, rumor detection, and political NLP research.

Download LIAR Dataset in Python

Instead of downloading the LIAR dataset in Python, you can effortlessly load it in Python via our Deep Lake open-source with just one line of code.

Load LIAR Dataset Training Subset in Python

				
					import deeplake
ds = deeplake.load('hub://activeloop/liar-train')
				
			

Load LIAR Dataset Testing Subset in Python

				
					import deeplake
ds = deeplake.load('hub://activeloop/liar-test')
				
			

Load LIAR Dataset Validation Subset in Python

				
					import deeplake
ds = deeplake.load('hub://activeloop/liar-val')
				
			

LIAR Dataset Structure

LIAR Data Fields
  • id: tensor that contains id.
  • label: tensor that contains the labels true, false, half-true, pants-fire, barely-true, mostly-true.
  • statement: tensor that statements.
  • subject: tensor that contain topics of discussion.
  • speaker: tensor that contain the details of the speaker such as name of the speaker.
  • job_title: tensor that contain the job title of the speaker.
  • state_info: tensor that contains the name of the state.
  • party_affiliation: tensor that contain details on party afficliation
  • barely_true_counts: tensor that contains the count for barely true statement.
  • false_counts: tensor that contains the count for false statements.
  • half_true_counts: tensor that contains the count for half true statements.
  • mostly_true_counts: tensor that contains the count for mostly true statements.
  • pants_onfire_counts : tensor that contains the count for pants on fire counts.
  • context: tensor that contains the context.
LIAR Data Splits
  • The LIAR dataset training set is composed of 10,269 statements.
  • The LIAR dataset test set is composed of 1283 statements.
  • The LIAR dataset validation set is composed of 1,284 statements.

How to use LIAR Dataset with PyTorch and TensorFlow in Python

Train a model on LIAR dataset with PyTorch in Python

Let’s use Deep Lake built-in PyTorch one-line dataloader to connect the data to the compute:

				
					dataloader = ds.pytorch(num_workers=0, batch_size=4, shuffle=False)
				
			
Train a model on LIAR dataset with TensorFlow in Python
				
					dataloader = ds.tensorflow()
				
			

LIAR Dataset Creation

Data Collection and Normalization Information

The LIAR dataset contains short 12.8 thousand manually-labeled statements from API 5 of politifact.com, checked for their authenticity by the politifact.com editors. Repeated labels were found and merged . The six fine-grained labels for the truthfulness ratings are the following: pants-fire, false, barelytrue, half-true, mostly-true, and true. A second-stage verifications was required to balance the distribution of pants-fire label. For this, the rate of agreement was measured with Cohen’s kappa to verify a randomly sampled subset of the analysis reports with the reporters’ analysis. Meta-data such as party affiliations, current job, home state, and credit history is also included for each speakers in LIAR dataset. The credit history consists of the historical counts of inaccurate statements for each speaker. A vastcoverage of the topics is ensured by including variety of subjects discussed by the speakers, as well as the top-10 most discussed subjects were also included.

Additional Information about LIAR Dataset

LIAR Dataset Description

LIAR Dataset Curators

William Yang Wang

LIAR Dataset Licensing Information

Deep Lake users may have access to a variety of publicly available datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have a license to use the datasets. It is your responsibility to determine whether you have permission to use the datasets under their license. If you’re a dataset owner and do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thank you for your contribution to the ML community!

LIAR Dataset Citation Information
				
					@article{wang2017liar,
  title={" liar, liar pants on fire": A new benchmark dataset for fake news detection},
  author={Wang, William Yang},
  journal={arXiv preprint arXiv:1705.00648},
  year={2017}
}
				
			
CONTENTS