Scylidose / TweetFeel

Gets the global sentiment behind a word using Twitter API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TweetFeel

Logistic Regression.


Overview

Will get the global sentiment behind a word using Twitter.

Sentiment_Estimator_png

Features

  • Display percentage of happiness of a given word

  • Show sentiment count, word cloud and most used words.

  • Retrieve and display random tweets with its estimated sentiment.

How to use

To clone and run this application, you'll need Git and Flask installed on your computer. From your command line:

# Retrieve git folder
$ git clone https://github.com/Scylidose/TweetFeel.git

$ cd TweetFeel/

# Install dependencies 
$ pip3 install -r requirements.txt

# Run application
$ make run

You can then access the application with the given address.

Data Steps

Fetch Data

Pre-process Data

  • Removed irrelevant punctuation, mentionned user, link and english stopwords.

  • Tokenized sentence.

  • Lemmatized tokens.

  • Deleted words longer than 15 characters.

  • TF-IDF Transformation.

Data Exploration

  • Most frequent words and Bi-grams.

  • Count of estimated Positive and Negative tweets.

  • Displayed the WordCloud.

Model

  • Logistic Regression :
    • L2 Penalty
    • Tolerance value of 0.001
    • C value of 1

Accuracy

  • Confusion Matrix

  • Accuracy classification score (Jaccard Score)

About

Gets the global sentiment behind a word using Twitter API.


Languages

Language:Jupyter Notebook 91.7%Language:Python 4.9%Language:HTML 2.7%Language:CSS 0.7%Language:Makefile 0.0%