Classifying the truth level of news articles to detect fake news
A fake news detector based on the LIAR-PLUS dataset.
Create a conda environment with python 3.6.8
conda create --name pytorch1.1 python=3.6.8
conda activate pytorch1.1
Install all dependencies using conda env create -f environment.yml
.
cd fake-news-classifier
mkdir datasets/
Download the LIAR_PLUS
dataset into datasets/LIAR_PLUS
and the pretrained word vectorswiki-news-300d-1M.vec
from fasttext
into datasets/word_embeddings
.
Train the model (for binary classification)
python main.py --phase train --binary yes
For hex classification use --binary no
Similar to training, provide the phase and binary state options through the CLI.
python main.py --phase test --binary yes