Giter Club home page Giter Club logo

sentiment_analysis's Introduction

Twitter Sentiment Analysis

V1

This version of sentiment analysis uses Tweepy library to access the Twitter API and uses the TextBlob library to do sentiment analysis on every tweet. Using this we can see the positivity and negativity of each tweet, whatever be its topic.

Dependencies :-

  • Tweepy
  • TextBlob

V2

This version of sentiment analysis uses the US Airline Tweets Dataset.The tweets are preprocessed and all stop words are removed and words are lematized using WordNet lemmatizer.The sentiment analysis is performed using the TextBlob library with an accuract of 62% on the test set.

Dependencies:

  • TextBlob
  • WordNet Lemmatizer
  • NLTK

V3

In this version of sentiment analysis we perform preprocessing on the tweets by removing all stopwords and then WordNet Lemmatizer is used to remove similar words.Then most common 3000 words from training set are found to make the training set.Various Machine Learning models(SVM, Random Forests, Multinomial Naive Bayes) are used from the sklearn library and the best accuracy is found by SVM at 77.6% by tweaking certain parameters.

Dependencies:

  • Sklearn
  • WordNet Lemmatizer
  • NLTK

V4

We have used the IMDB Large Review dataset(preloaded in keras and converted to integer tokens) to perform sentiment analysis.We have 1 LSTM layer and 1 Dense layer(with sigmoid activation) to perform sentiment analysis.This is different from the earlier versions because the average length of reviews in this dataset is 470 words which is much larger than those used in earlier cases.LSTM helps in this case as it remember words from earlier better(to understand about LSTM read chris olah's post about the same). After training we have been able to achieve 83% accuracy after using a single LSTM unit and the first 500 words from vocabulary.

Dependencies:

  • Tensorflow
  • Keras
  • Numpy

sentiment_analysis's People

Contributors

vaibhavkumar11 avatar

Stargazers

Roman 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.