Skip to content

Natural Language Processing with Python for The Office

License

Notifications You must be signed in to change notification settings

currocam/TheOffice

Repository files navigation

https://es.wikipedia.org/wiki/The_Office#/media/Archivo:The_Office_US_logo.svg

Natural Language Processing with Python for The Office

This following scripts explore different aspects of Natural Language Processing using the transcription of the The Office series. It was created with educational purposes. I have used this dataset The Office (US) - Complete Dialogue/Transcript.

Features

  1. Character Wordcloud generator using the wordcloud library.
  2. Get a character n-grams from his/her text lines.
  3. Analyse a character sentiments expressed in The Office using the VADER (Valence Aware Dictionary and sEntiment Reasoner) library. We quantify sentiment polarity (positive/negative) on a scale from -1 to 1.
  4. Analyse a character sentiments expressed in The Office using the TextBlob library. We quantify sentiment polarity (positive/negative) on a scale from -1 to 1 and subjectivity (objective/subjective) on a scale from 0 to 1.
  5. Research affinity between characters from the the sentiment analysis of their lines during the scene where they appear.

Technologies

  • Python 3.8.5

Example of use

Wordcloud

python nubePalabras.py Pam 

images/Pam_nube.png

n-gram

python ngram_TheOffice.py Jim

images/Jim_n-gramas.png

Sentiment analysis using TextBlob

python SentimentAnalysis_TextBlob.py 

images/TextBlob_AnalisisSentimientos.png

Sentiment analysis using VADER

python SentimentAnalysis_Vader.py 

images/Vader_AnalisisSentimientos.png

Affinity analysis

Representing polarity and subjectivity obteined from Pam and Jim's lines in scenes where both appear.

python afinidadPersonajes.py

images/Afinidad_Pam_Jim.png

About

Natural Language Processing with Python for The Office

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages