From the course: R for Data Science: Lunch Break Lessons

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

NLP packages: Sentiment analysis

NLP packages: Sentiment analysis

- [Instructor] Sentiment analysis is often used to assess customer satisfaction. It looks for correlation between known and unknown text. For example, the known text which is called a dictionary, identifies positive and negative terms and phrases. The unknown text comes from various sources things like Twitter or surveys or focus group transcripts, other source of unknown texts that you'd like to analyze. Now, let's look at sentiment analysis and the sentiment analysis package for R. The first thing you'll need to do of course, is install the package. And in the example code line three, you can see I've done that. Then you'll need to use the library command to bring the sentiment analysis package into play. Now with a sentiment analysis package, there are three concepts that you'll need to think about. A corpus, a dictionary and a rule. So let's start with a corpus. With the sentiment analysis package, several different…

Contents