Basic Sentiment Analysis

by Scott Kaye

HTML

[{ "in": "the rock is destined to be the 21st century's new  conan  and that he's going to make a splash even greater than arnold schwarzenegger , jean-claud van damme or steven segal . ", "sentiment": "positive" },
{ "in": "the gorgeously elaborate continuation of  the lord of the rings  trilogy is so huge that a column of words cannot adequately describe co-writer/director peter jackson's expanded vision of j . r . r . tolkien's middle-earth . ", "sentiment": "positive" },
{ "in": "effective but too-tepid biopic", "sentiment": "positive" },
{ "in": "if you sometimes like to go to the movies to have fun , wasabi is a good place to start . ", "sentiment": "positive" },
{ "in": "emerges as something rare , an issue movie that's so honest and keenly observed that it doesn't feel like one . ", "sentiment": "positive" },
{ "in": "the film provides some great insight into the neurotic mindset of all comics -- even those who have reached the absolute top of the game . ", "sentiment": "positive" },
{ "in": "offers that rare combination of entertainment and education . ", "sentiment": "positive" },
{ "in": "perhaps no picture ever made has more literally showed that the road to hell is paved with good intentions . ", "sentiment": "positive" },
{ "in": "steers turns in a snappy screenplay that curls at the edges ; it's so clever you want to hate it . but he somehow pulls it off . ", "sentiment": "positive" },
{ "in": "take care of my cat offers a refreshingly different slice of asian cinema . ", "sentiment": "positive" },
{ "in": "this is a film well worth seeing , talking and singing heads and all . ", "sentiment": "positive" },
{ "in": "what really surprises about wisegirls is its low-key quality and genuine tenderness . ", "sentiment": "positive" },
{ "in": "one of the greatest family-oriented , fantasy-adventure movies ever . ", "sentiment": "positive" },
{ "in": "ultimately , it ponders the reasons we need stories so much . ", "sentiment": "positive" },
{ "in": "an...

JavaScript

var stemmer=function(){var g={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},h={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""};return function(a){var d,b,e,c,f;if(3>a.length)return...