The sentimentr package provides functions to analyze sentiments. Use this package to find sentiment scores for movie reviews.
- [Instructor] For this sentiment analysis example, … we will use the file Movie-Reviews.txt … which is available under the reviews directory … in the Exercise Files. … This file contains reviews … by various users for the "Captain Marvel" movie. … We will find the polarity and emotions … of these reviews in this chapter. … The code for this chapter … is available in the file code_02_XX Sentiment Analysis.R. … Let's look at the code now … to see what data preparation we need to do. … We need the sentimentr, data.table … and plyer packages for this exercise. … I'm going to now install the sentimentr package … which will install the other two also. … It has been successfully installed. … Now we can load all the packages. … Let's look at the code now. … First, we need to load the Movie-Reviews.txt file … into a character vector. … This provides an element for each line in the file. … Next, we break up these lines into individual sentences … using the get_sentences function. … This returns a list of vectors. …
- Creating a word cloud
- Analyzing sentiment
- Extracting emotions from text
- Clustering similar entities based on text
- Using classification for supervised learning
- Recommending items to users based on text data analytics
Skill Level Intermediate
Predictive Customer Analyticswith Kumaran Ponnambalam1h 37m Intermediate
1. Word Cloud
2. Sentiment Analysis
5. Predictive Text
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.