Coder Social home page Coder Social logo

nlp-project-fake-news-detection's Introduction

NLP-Project-Fake-News-Detection

NLP-Project-Fake-News-Detection

Dataset Used : LIAR Dataset

Paper : https://arxiv.org/abs/1705.00648
Data : https://www.cs.ucsb.edu/~william/data/liar_dataset.zip

Original Source:

The paper did not release the source code.

List of commands:

Run all the cells in the ipython notebook.

Train :

function : train(model,architecture, use_pos, use_meta, use_dep)

  • params :
    • model : keras Sequential model
    • architecture : 'lstm' or 'cnn'
    • use_pos : boolean (tells whether the POS embeddings are to be used as input to the model for training)
    • use_meta : boolean (tells whether the metadata is to be used as input to the model for training)
    • use_dep : boolean (tells whether the Dependency parse embeddings are to be used as input to the model for training)

Evaluation on test:

function_1 : (false_predicted,true_predicted) = evaluate(model, use_pos, use_meta, use_dep)

  • params :
    • model : keras Sequential model
    • use_pos : boolean (tells whether the POS embeddings were used as input to the model while training)
    • use_meta : boolean (tells whether the metadata was used as input to the model while training)
    • use_dep : boolean (tells whether the Dependency parse embeddings were used as input to the model while training)
  • returns :
    • false_predicted : dictionary with keys as indices of test samples that were classified as "pants-on-fire" (false news) and values as the softmax probability for this class label.
    • true_predicted : dictionary with keys as indices of test samples that were classified as "true" (not a fake news) and values as the softmax probability for this class label.

function_2 : print_best_false_true_predicted(false_predicted,true_predicted)

  • params :
    • outputs from the above mentioned evaluate() function.
  • outputs :
    • prints top 5 sentences which where predicted as "pants-on-fire" (fake news) with highest softmax probabilities.
    • prints top 5 sentences which where predicted as "true" (not fake news) with highest softmax probabilities.

Software and Library Requirements:

Keras==2.2.2
matplotlib==2.1.2
numpy==1.15.4
pandas==0.22.0
pydot==1.4.0
scikit-learn==0.19.1
scipy==1.0.0
sklearn==0.0
spacy==2.0.18
tensorboard==1.9.0
tensorflow==1.9.0
spacy==2.0.18
nltk==3.4

nlp-project-fake-news-detection's People

Contributors

bedarkarpriyanka avatar roydeb avatar siddarthhari95 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.