Skip to content

Instantly share code, notes, and snippets.

@scowalt
Created May 2, 2012 17:50
Show Gist options
  • Save scowalt/2578658 to your computer and use it in GitHub Desktop.
Save scowalt/2578658 to your computer and use it in GitHub Desktop.
TwitterSentiment Datagram JS
{
'tweet' : {
//preserved from stream API
//details here: https://dev.twitter.com/docs/api/1/get/statuses/user_timeline
},
'weights': {
'happiness': -10,10, /* sum of all scores, face weight added in, etc. */
'excitement': -10,10, /* exclamation points, absolute value of scores, etc. */
'randomness': -10,10
},
//'face' : {
// 'rawScore' : -56, //int from -100 to 100, null if no face found
// 'score' : -6 //int from -10 to 10, 0 if no face found
//},
'randomness' : {
'exclamations' : 3, // !!!
'questions' : 3, // ???
'slashes' : 3 // slashes
'score' : 10 // final randomness score
},
'text_sentiment' : {
'score' : -4,
'recognized' : ['these', 'words', 'were', 'scored'],
'unrecognized' : ['not', 'in', 'dictionary']
}
'user_info' : {
'followers_per_tweet' : 0.2386123852
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment