Loading 02_code/R/Script 2 - Sentiment analysis.R +6 −0 Original line number Diff line number Diff line Loading @@ -121,7 +121,13 @@ rev.sentiment$label.afinn <- ifelse(rev.sentiment$score.afinn >= 1, "Positive", # Sentiment score using nrc dictionary rev.sentiment$score.nrc <- get_nrc_sentiment(rev.sentiment$reviews) # calculating coorelation between the results of dictionaries correlation_matrix <- cor(rev.sentiment[c("sent.score", "score.syuzhet", "score.afinn")]) # Print the correlation matrix print(correlation_matrix) write.csv(rev.sentiment,file = "C:/Users/hetvi/OneDrive/Desktop/rev.sentiment.csv") # Emotion analysis--------------------------------------------------- # Extracting the NRC emotion scores for each term Loading Loading
02_code/R/Script 2 - Sentiment analysis.R +6 −0 Original line number Diff line number Diff line Loading @@ -121,7 +121,13 @@ rev.sentiment$label.afinn <- ifelse(rev.sentiment$score.afinn >= 1, "Positive", # Sentiment score using nrc dictionary rev.sentiment$score.nrc <- get_nrc_sentiment(rev.sentiment$reviews) # calculating coorelation between the results of dictionaries correlation_matrix <- cor(rev.sentiment[c("sent.score", "score.syuzhet", "score.afinn")]) # Print the correlation matrix print(correlation_matrix) write.csv(rev.sentiment,file = "C:/Users/hetvi/OneDrive/Desktop/rev.sentiment.csv") # Emotion analysis--------------------------------------------------- # Extracting the NRC emotion scores for each term Loading