0

im a newbie and im trying to get to work with Rstudio for my final project. As i know that NRC Emolex is available in 40+ languages including Indonesian language. My problem is, I still dont know how to get the sentiment score with NRC Emolex in Indonesia language. I hope everybody can help, thank you in advance!

enter image description here

code that i tried

    setwd("F:/SKRIPSI/EKSTRAKSI FITUR/TEST")

#install.packages("tidyverse")
#install.packages("tidytext")
#install.packages("textdata")

library(tidyverse)      # data manipulation & plotting
library(stringr)        # text cleaning and regular expressions
library(tidytext)       # provides additional text mining functions

# to see the individual lexicons try
get_sentiments("afinn")
get_sentiments("bing")
get_sentiments("nrc")

data that i want to import and use https://drive.google.com/file/d/1tzdZlfS-mf2Y6W-bYQC4qMR9n7AEwgfn/view?usp=sharing

  • You seem rather new here, so welcome to SO! Unluckily your question is quite broad and a bit unfocused, could you add some data, code, packages and attempts to make your question reproducible and more focused? – s__ Jul 02 '20 at 08:09
  • @s_t thank you for your respond! i tried the code from https://uc-r.github.io/sentiment_analysis, i tried this code and i still dont know how to import my data – sarah monika n Jul 02 '20 at 12:29
  • @s_t i edited my question above and added the code and the data source – sarah monika n Jul 02 '20 at 12:44
  • Tidytext only has the English nrc lexicon. You will need to import the NRC Emolex in the Indonesian language and reshape the data into a long format. Aka 2 columns, 1 word, 1 sentiment. Once you have that done, you can just use tidytext and combine your text with the needed sentiment data. – phiver Jul 02 '20 at 14:45
  • @phiver is there any example how to import the NRC and reshape the data? – sarah monika n Jul 03 '20 at 01:08

0 Answers0