Skip to content

Commit b8773af

Browse files
committed
added code for packages and data loading
1 parent e5e5a42 commit b8773af

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

chapters/3.SentimentAnalysis/introduction.qmd

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,18 @@ While the analysis of public opinion predates the Internet, the modern field of
1818
1919
Whether through product reviews, political commentary, or social media posts in virtually any possible topic of interest, sentiment analysis aims to quantify and interpret subjective information at scale, enabling applications in marketing, social science, finance, and beyond. In this course, we will explore ways of extracting insights from textual data, in particular how we can detect underlying emotions within messages shared by people on a popular streaming TV series.
2020

21-
Our analysis pipeline will follow a two-step approach. First, we will compute basic sentiment polarity to determine whether viewers who commented on both season finales reacted more negatively, neutrally, or positively. Next, we will apply a more fine-grained emotion detection technique to capture and analyze the specific emotional expressions conveyed in the text.
21+
Our analysis pipeline will follow a two-step approach. First, we will compute basic sentiment polarity to determine whether viewers who commented on both season finales reacted more negatively, neutrally, or positively. Next, we will apply a more fine-grained emotion detection technique to capture and analyze the specific emotional expressions conveyed in the text.
22+
23+
Let’s start by installing and loading the necessary packages, then bringing in the cleaned dataset so we can begin our sentiment analysis.
24+
25+
``` r
26+
# Install Packages
27+
install.packages(c("sentimentr", "syuzhet"))
28+
29+
# Load Packages
30+
library(sentimentr)
31+
library(syuzhet)
32+
33+
# Load Data
34+
comments <- readr::read_csv("../data/clean/comments_preprocessed.csv")
35+
```

0 commit comments

Comments
 (0)