Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Tweet Moods - Given a specific twitter search, track N number of tweet's mood...
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
data
lib
mongoose @ 779f3af
public
.gitmodules
Capfile
README
anew.rb
sentiment.rb
server.js

README

Tweet Moods
----------


Given a specific twitter search, track N number of tweet's.
 
   For each tweet determine:

   * approximate sentiment

Build a user interface that displays a line chart of average sentiment over time

=== Background on sentiment analysis
  
  * ANEW or Affective Norms for English Words from 1999 research
    + Valance -> good - bad  scale 9 - 1
    + Arousal -> active - passive scale 9 - 1
    + Dominance -> strong - week scale 9 - 1
    + 1034 words, based on 1974 research showed words have meaninful emotional context  

  Valance scale (happy-unhappy scale):
     happy, pleased, satisfied or contented, hopeful, bored or despaired, melancholic, unsatisfied, annoyed, completely unhappy
      9        8                 7              6             5                4             3          2             1 


=== Deploying, requires a front end server/proxy

for example, i use nginx with the following configuration

upstream twitter_track {
  #server 127.0.0.1:1234;
  server unix:/Users/taf2/work/captico/tweetmood/server.sock;
}

server {
  listen 80;

  server_name tweet_mood.com;

  root /Users/taf2/work/captico/tweetmood/public;

  location /tweets {
    index  index.html index.htm;

    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_redirect off;

    proxy_pass http://twitter_track;
  }

  location / {
    index  index.html index.htm;

  }

}

====
Resources

* http://barabasilab.neu.edu/projects/twittermood/
* http://www.springerlink.com/content/757723154j4w726k/fulltext.html
* http://dev.twitter.com/pages/streaming_api_methods
* http://www.manifestdensity.net/2010/06/16/anew/
* http://github.com/kvz/phpjs/raw/master/functions/strings/sprintf.js
Something went wrong with that request. Please try again.