Commit 943efee3 authored by Hetvi Ariwala's avatar Hetvi Ariwala
Browse files

Correlation between different sentiment scores has been performed.

parent 78049b86
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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