Are you happy or sad?

[This article was first published on Renglish – 56north | Skræddersyet dataanalyse, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Well, if you wrote about it we might be able to figure it out with my new package: happyorsad

Happyorsad is a sentiment scorer. It uses the approach of Finn Årup Nielsen from Informatics and Mathematical Modelling at the Technical University of Denmark and this AFINN lists hosted in his Github repo.

Finn Årup Nielsen has constructed three lists that makes it possible to sentiment score in english, danish and using emoticons. There are already a few sentiment packages for english, but this is the first one for danish and as far as I now also the first one to sentiment score emoticons.

A big shout out to Finn for the lists.

If you want to try it out then just run the code below. Looking forward to your feedback!

if(!require("devtools")) install.packages("devtools") devtools::install_github("56north/happyorsad") # Examples of sentiment scoring library(happyorsad) # Score danish words string_da <- 'Hvis ikke det er det mest afskyelige elendige flueknepperi...' happyorsad(string_da, "da") # Score english words string_en <- 'This is utterly excellent!' happyorsad(string_en, "en") # Score emoticons string_emoticon <- 'I saw that yesterday :)' happyorsad(string_emoticon, "emoticon")

To leave a comment for the author, please follow the link and comment on their blog: Renglish – 56north | Skræddersyet dataanalyse.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)