项目作者: rshwndsz

项目描述 :
Classifying the truth level of news articles to detect fake news
高级语言: Python
项目地址: git://github.com/rshwndsz/fake-news-classifier.git
创建时间: 2019-08-07T10:25:40Z
项目社区:https://github.com/rshwndsz/fake-news-classifier

开源协议:

下载


Fake news classifier

Abstract

A fake news detector based on the LIAR-PLUS dataset.

Getting Started

Create a conda environment with python 3.6.8

  1. conda create --name pytorch1.1 python=3.6.8
  2. conda activate pytorch1.1

Install all dependencies using conda env create -f environment.yml.

  1. cd fake-news-classifier
  2. mkdir datasets/

Download the LIAR_PLUS dataset into datasets/LIAR_PLUS and the pretrained word vectors
wiki-news-300d-1M.vec from fasttext
into datasets/word_embeddings.

Training

Train the model (for binary classification)

  1. python main.py --phase train --binary yes

For hex classification use --binary no

Testing

Similar to training, provide the phase and binary state options through the CLI.

  1. python main.py --phase test --binary yes

References