Is there a way to modify words in the sentimentr package?
For example I want to change the word "please" to have a negative score rather than a positive one.
Now I'm using the function:
text$sentiment <- sentiment_by(text$Comment)
to evaluate sentence sentiment.
One can modify the polarity dictionary used by the
sentimentfunction of thesentimentrpackage as follows:Similar results can be achieved with
sentiment_by. And with either function it is possible to merge the text elements with the output: