Giter Site home page Giter Site logo

clickbait-headlines-detection's Introduction

Clickbait-headlines-detection

Motivation

There is an overwhelming amount of news information available online. Some news headlines are known as clickbait – they aim to attract users to click on a link but the articles that they link to may not be of value or interest to the reader. In this project we aim to answer the following question: Can we automatically distinguish between clickbait and non-clickbait headlines, using a variety of linguistic cues?

Data

You are provided with a corpus of clickbait and non-clickbait article headlines. The corpus is described in detail in this paper: https://arxiv.org/pdf/1610.09786.pdf

Approach

Using the NLTK library, the important aspects of linguistic cues have been extracted from the text corpus. These features played a pivotal role in classifying the headlines. The model used here was Naive Bayes algorithm. Below are the features used to train the dataset:-

  1. Stop words: counts for each function word (from the NLTK stopwords list)
  2. Syntactic: counts for the following 10 common POS tags -- ['NN', 'NNP', 'DT', 'IN', 'JJ', 'NNS','CC','PRP','VB','VBG']
  3. Lexical: counts for 30 most common unigrams in entire corpus
  4. Punctuation: Counts for each punctuation mark
  5. Complexity: average number of characters per word, #unique words/#total words, number of words, Count of “long” words - words with >= 6 letters
  6. Slangs: From the paper https://arxiv.org/pdf/1610.09786.pdf, it is understood that certain words like ‘WOW’, AND ‘LOL’, appear frequently in clickbait texts. By compiling the list of all the widely used and recognized slangs, the count of those slangs in the headline was considered as a feature.
  7. Contractions: Words like 'they'd' or 'Here's' appeared more frequently than non-clickbait text.
  8. Titlecase Words: After noticing both the set of headlines, one stark difference was noticed, that a lot of headlines of the clickbait text were titlecase texts. Meaning that the first letter of each word is capitalized. This was not seen in the texts of non-clickbait headlines. Hence, I thought it would be a good idea to include the number of ‘title-cased’ words as a feature.

Evaluation

The feature set described above was used in 2 ways. The MultinomialNB algorithm is used in training individual features and, is leveraged in the process of combining all the features. The latter gave the best accuracy. The table below shows the accuracies on individual features:-

Feature Set Accuracy
Stop words 0.8736
Syntax 0.7578
Lexical 0.5
Punctuation 0.5
Contractions 0.5
Slangs 0.5
Titlecase 0.5
Complexity 0.7321
All features combined 0.9676

clickbait-headlines-detection's People

Contributors

lewy09-tm25 avatar

Watchers

 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.