Skip to content

Instantly share code, notes, and snippets.

@gearmonkey
Created May 10, 2011 11:17
Show Gist options
  • Select an option

  • Save gearmonkey/964289 to your computer and use it in GitHub Desktop.

Select an option

Save gearmonkey/964289 to your computer and use it in GitHub Desktop.
grab a tweet and push it to the mm sentiment analyzer
#grab some data from twitter
data = loads(urllib2.urlopen("http://api.twitter.com/1/statuses/show/{0}.json".\
format(twitter_id)).read())
tweet_content = data["text"]
#push to sentiment analysis
raw_senti = loads(urllib2.urlopen(\
"http://apib1.semetric.com/musicmetric/sentiment?token="+\
API_KEY, data = tweet_content).read())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment