From the course: Data Science Foundations: Data Mining in Python
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Sentiment scoring - Python Tutorial
From the course: Data Science Foundations: Data Mining in Python
Challenge: Sentiment scoring
(upbeat music) - [Instructor] And now that we've finished the demonstrations for our last chapter on text mining, I want to give you one more opportunity to get some hands-on practice with one of these procedures. What I'm going to ask you to do is the sentiment scoring for a new document. And in this case, we're going to use "Little Women" by Louisa May Alcott. I've downloaded a local version from Project Gutenberg and put it into our data folder. but I'm going to invite you to do the same thing that I did with the sentiment scoring in the "Iliad." import the text, add section numbers to put into sections of 100 lines, tokenize the data, score the sentiments, calculate the average sentiment scores for each section of 100 lines and graph the sentiment arc or the narrative arc of the entire story. You can follow the example of sentiments going from the "Iliad." And then let's meet back here in just a minute to compare our…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.