Coder Social home page Coder Social logo

twitter-sentiment's Introduction

Twitter-Sentiment-Analysis-Web

Twitter Sentiment Analysis using Textblob and Tweepy, wrapped with Flask as a web app.

Working Demo

Installation

  1. Clone/Download this repository.
  2. Obtain your Twitter API credentials.
  3. Replace appropriate credentials in main.py file.
  4. Install all the required dependencies listed in requirements.txt.
  5. Run the flask server using python main.py to see the result on port 5000(by default).

A brief on the libraries used :

Mainly I have used TextBlob and Tweepy for the main functionality. TextBlob is a great choice for NLP tasks, built on top of the famous Python library for NLP, i.e., NLTK. Tweepy is used for Interacting easily with the Twitter API and handling complex tasks such as Authentication(OAuth) with a breeze.

TextBlob allows us to perform sentiment analysis with very few lines of code. Applying .sentiment on a TextBlob gives us two things - Polarity and Subjectivity.

  • Polarity is a float value within the range [-1.0 to 1.0] where 0 indicates neutral, +1 indicates a very positive sentiment and -1 represents a very negative sentiment.

  • Subjectivity is a float value within the range [0.0 to 1.0] where 0.0 is very objective and 1.0 is very subjective. Subjective sentence expresses some personal feelings, views, beliefs, opinions, allegations, desires, beliefs, suspicions, and speculations where as Objective sentences are factual.

twitter-sentiment's People

Contributors

devesh-maheshwari avatar

Watchers

James Cloos 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.