Git Product home page Git Product logo

sentiment-analyzer's Introduction

Sentiment Analyzer

A Python module to do a set of operations on tweets. It uses a collection of stopwords to train a dataset for the sentiment analysis. It uses the basic principle of bag-of-words used for natural language processing.

Dependencies

  • numpy
  • matplotlib(To plot sentiments)

How to use

from src import features, datalink, hashtags
import time
dblink = datalink.DatabaseConnectionDown('perilipsi_tweets')
emoTest = features.Emoticons()
dictTest = features.DictionaryTest()
hashtest = hashtags.hashtags()
testTweet, tweetTime = dblink.fetchTweet()['tweet'], dblink.fetchTweet()['time']	#You can pass anything you want
emo_test = emoTest.analyse(testTweet)
dict_test = dictTest.analyse(testTweet)
hash_test = hashtest.analyseHashtagTweet(testTweet)
print "Emoticons:", emo_test
print "DictionaryTest:", dict_test
print "Hashtags: ", hash_test

Output

Emoticons: {'positive': 0.33, 'negative': 0.66}
DictionaryTest: {'positive': 0.46153846153846156, 'negative': 0.5384615384615384}
Hashtags:  {'positive': 0.38, 'negative': 0.62}

Progress

  • Emoticons: This class uses emoticons detection to classify the passed string as positive or negative
  • DictionaryTest: This class uses a set of English words and their subjectivity to give a score to a string
  • hashtags: This class extracts hashtags from the string sent and calculates the sentiment based on a trained dataset
  • AllCaps
  • ElongatedWords
  • Negation
  • Punctuation

Social Network APIs

  • Twitter Search API
  • Facebook Graph API

Computation Engines

Wolfram Alpha

Team Members

NameEmail
Sudhanshu Mishra [email protected]
Ambar Mehrotra[email protected]

Bitdeli Badge

sentiment-analyzer's People

Contributors

bitdeli-chef avatar debugger22 avatar

Watchers

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