statistics - R sentiment analysis score for tweets -


i trying perform sentiment analysis on twitter data set. using few positive , negative dictionaries. want below tweet

the movie intersteller insanely awesome

positive dictionary: 2 awesome 5

negative dictionary: bad -2 insanely -3

so score of tweet should = -3 (insanely) + 5(awesome) = 2

i have been able match dataset against these dictionary create posmatch variable looks below: posmatches <- match(words, afinn_list$word)

posmatches na na na na 1104 na na na na na na na na na na na na 1836 na know location contains match. need sum of weigts of location 1104 , 1836 in above example

what need sum on posmatches not considering nas:

 sum(posmatches, na.rm = true) 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -