arrow_back Back to 2016 Projects
school CMDA III — 2016 Cohort (56 projects)
science NLP

Natural Language Processing

Completed calendar_month 2016 group 4 Students

descriptionProject Overview

Packages are collections of R functions, data, and compiled code in a well-defined format. The directory where packages are stored is called the library . Natural language processing (NLP) is the interaction between computers and human (natural) language. Tm, BoilerpipeR, RCurl and Word clouds are among the packages used in natural language processing that we use in our project. To start using the packages one downloads each from CRAN website and loads it into R alongside its dependencies. In this study, we hope to use the 4 packages to predict which of the 2 US presidential aspirant candidates: Hillary Clinton and Donald Trump would win. We compared their speeches to 2 past president elects who won the presidency: Barrack Obama and George W. Bush. Our study majored on their speeches on three different categories: Foreign Policy, victory speech when elected as party representatives and speech on Jobs and the Economy. We extracted the common phrases to compare the speeches of Hillary and Trump to Obama and Bush. We then derived the frequency of these key phrases in each of the 12 speeches. As a visual aid, these frequencies were plotted as 4 histograms, 1 for each politician. We also derived the most frequently said words of the 4 politicians in their speeches and illustrated them as world clouds. Our conclusion would be based on the president elect who had the most key phrases as compared to the 2 previous presidents.

groupProject Team

D
Dennis Njoroge Ndun’gu
Student Researcher · 2016
M
Mathew Waweru Njunge
Student Researcher · 2016
K
Kenneth Wanyoike Kamau
Student Researcher · 2016
W
Wanja Nyambura Muriu
Student Researcher · 2016

articleRelated Publications

Journal

The Trends and Burden of Mental Disorders in South Sudan

Malang A.B., Kamanu T.K.K., Ndetei D.M., Luketero S.W. and Mohammed Z.M.S. · 2026

open_in_newView Paper
Journal

Leveraging on Hybrid Machine Learning Models for Early Breast Cancer Detection

Nyakundi G., Ndiritu J., Ivivi J.M. and Kamanu T.K.K. · 2026

open_in_newView Paper
Journal

Disaggregating Poverty Estimates to Sub-County Level using Small Area Model: Application of EBP

Onchomba D.O. and Kamanu T.K.K. · 2026

open_in_newView Paper
All Publications