From the course: Data Science Foundations: Data Mining in R

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Sentiment analysis: Binary classification

Sentiment analysis: Binary classification

From the course: Data Science Foundations: Data Mining in R

Start my 1-month free trial

Sentiment analysis: Binary classification

- [Instructor] Our first demonstration of text mining in R is going to be the simplest case. We're going to look at sentiment that is emotional evaluations of texts, which is the binary positive or negative evaluation. And to do this with the Iliad, I'm going to start by importing some packages in Gutenberg and tidy text are the important ones. And then we're going to import the data. Now this is from project Gutenberg which is available online, but I've already saved the data and I'm going to simply import it from our data folder where it's elliod.txt and save it as tibble into DF. And that stands for data frame and just makes it easy for me to reuse my commands. Let's take a look at the first few rows and what you see here, are, this is the ID number for the text 60 150. And these are the first few rows from the title page. Now, the first thing we need to do is prepare the data and that involves tokenizing the data. A…

Contents