2

I am using sentiment analysis function sentiment_by() from R package sentimentr (by trinker). Would like to understand how to modify the negators, amplifiers, de-amplifiers. I could update the polarity table & valence shifters.

Would like to tinker around the dictionaries to make it suit for my domain. For ex "A frustrating experience - not cool to pay that much per month for a bad app like that. Unprofessional" is yielding me an ave.sentiment of 0. So I am trying to understand the dictionary and weights a little more

Also would like to understand if there are any specific text clean up utility to run before passing it to the sentiment_by() function (like in qdap ). There isn't much documentation available on these aspects for sentimentr package. Any help is appreciated

Tyler Rinker
  • 108,132
  • 65
  • 322
  • 519
Swsankar
  • 21
  • 1
  • 2
    I just ran and got an ave.sentiment of `-0.3395499` For altering dictionaries have you looked at `update_key`? – Tyler Rinker Jun 01 '16 at 21:18
  • @Tyler - Got it - I messed up with the text, I had used the `strip` function before calling `sentiment_by` and that has removed the hyphen in the sentence resulting in an `ave_sentiment` of 0. Now am getting -0.2357. Thanks for the info, I went through the `update_key` and with that i am now able to update the polarity_table and valence_shifters_table. However, the valence shifters seems to just have all positive values - so was wondering how do you differentiate between amplifiers and de-amplifiers. Similarly does one get to access the negator list ? – Swsankar Jun 02 '16 at 14:46
  • 2
    It could probably be clearer in the `update_key` function but have a look at the arguments for `sentiment` or better still `?sentimentr::valence_shifters_table`. Also, I think with the most up-to-date version you should have got -.3395499 too. But maybe I'm using an old version. Also I don't think 'unprofessional' is in the main sentiment dictionary and will probably add it. – Tyler Rinker Jun 03 '16 at 02:09

0 Answers0