Skip to content

Exploring Sentiments, key-phrase extraction and Inferences from the two Presidential debates between Trump and Biden...

License

Notifications You must be signed in to change notification settings

Lawrence-Krukrubo/Analyzing-The-Presidential-Debates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analyzing The Presidential debates of Trump and Biden

Intro:

This Project was done primarily to shed more lights on the responses from President Trump and Vice President Biden, during the Presidential debates on Sept 29th and 22nd Oct 2020.
The data for this entire project was scraped from rev.com

Methodology:

The Scientific methodology for this project includes the following:-

  1. Web-Scraping: Via requests and BeautifulSoup libraries
  2. Data cleaning and Pre-processing
  3. Speech-Percentage Computation
  4. Lexical-Diversity analysis
  5. TFIDF Computation
  6. Text Tokenization
  7. Stopwords Removal: Via nltk library
  8. Punctuations Removal: Via String library
  9. Text Lemmatization: via nltk WordNetLemmatizer
  10. Sentiments Analysis: Via Microsoft Azure Text-Analytics-Client
  11. Key-Phrase-Extraction: Via Microsoft Azure Text-Analytics-Client
  12. Bayesian Inference

Summary:

* The first debate was on September 29, 2020. It was moderated by Chris Wallace of Fox News.
* The second debate was originally scheduled for October 15th, but was cancelled due to Trump’s bout of COVID19, and held a week later. After his ‘rather-theatrical-and-spectacular-recovery’. This debate was moderated by Kristen Welker of NBC News.

* Kindly see the analysis within the analysis_dir folder and pay attention to the defined methods and intuition of the analysis.
* From this exercise, I have been able to compare and contrast Trump and Biden's language style, sentiments, responses to key questions and understanding.
* This Project gives the American public and the world at large, the rare insights to the lexical signature and language structure of President trump and Vice-President Biden.
* The project also explains some of their responses to Key-Areas such as racism, The US Economy, Health-care, Jobs/Wages/Taxes and The American People.

Blog Post:

As a Top-Writer in Artificial Intelligence, I have taken the time to expressively, explain my findings in a conversational and less-technical manner for all. Kindly read the post in the Towards_AI publication in the Medium.

Dependencies:

To Follow along, kindly install/import the following libraries...

  • import numpy as np
  • import pandas as pd
  • import matplotlib.pyplot as plt
  • import seaborn as sns
  • from pywaffle import Waffle
  • from PIL import Image
  • import nltk
  • from nltk import word_tokenize
  • nltk.download('stopwords') # For stopwords removal
  • nltk.download('punkt') # for tokenization
  • from nltk.corpus import stopwords *from nltk import WordNetLemmatizer # To lemmatize sentences
  • nltk.download('wordnet')
  • from nltk.stem.porter import PorterStemmer
  • from wordcloud import WordCloud
  • import spacy
  • from collections import defaultdict, Counter
  • from bs4 import BeautifulSoup
  • import requests
  • import string
  • import math

License:

This project and all resources abide under the MIT license in the root directory.

About

Exploring Sentiments, key-phrase extraction and Inferences from the two Presidential debates between Trump and Biden...

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published