Skip to content

The idea is to plot the emotion of the story in a graph. So that we can literally "see" the roller coaster of emotions the movie has to offer.

Notifications You must be signed in to change notification settings

sarathsajan/movie-plot-sentiments

Repository files navigation

Movie Plot Sentiments

The idea is to plot the emotion of the story in a graph. So that we can literally "see" the roller coaster of emotions the movie has to offer.


Procedure

  • A python program that uses the text-blob library to gauge the sentiments of the movie plot one sentence at a time.

  • We just copy the plot from wikipedia and paste the plot of as a string variable in python.

  • Then clean the string for numbers, special characters and citation numbers that are usually present in a wikipedia content.

  • Split the large string into single sentences using fullstops as the divider.

  • Import TextBlob and input the whole plot pragraph line by line in a FOR loop and let TextBlob do its magic. Copy the resulting list of numbers(sentiments value) to an excel/csv file and plot the graph.


Some Examples

X axis: Nth sentence in the plot

Y axis: Polarity of the sentence (1.0=positive, 0.0=neutral, -1.0=negative)











About

The idea is to plot the emotion of the story in a graph. So that we can literally "see" the roller coaster of emotions the movie has to offer.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages