From the course: Text Analytics and Predictions with Python Essential Training

Unlock the full course today

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

Summarization and display

Summarization and display - Python Tutorial

From the course: Text Analytics and Predictions with Python Essential Training

Start my 1-month free trial

Summarization and display

- [Instructor] Let us summarize and present sentiment data regarding the Marvel movies that we just analyzed. First, we should create a label list for negative, positive and neutral labels. We create an equal and value list that counts for each of the labels. We initialize them to zero. Next, we walk through the reviews again and perform sentiment analysis. We now convert the continuous polarity value into a discrete class value of values zero, one and two. We apply a formula that drowns this value and moves it to the positive range. The class values of zero, one and two match with the labels negative, neutral and positive. Based on the values arrived with the reviews, we update the array with the counts. The index of the value array will match the class value read for polarity. Finally, we plot the values with the labels into a pie chart. Let us go and execute this code. This provides a good summary of the overall sentiments found in the movie reviews corpus. It helps a movie goer…

Contents