Several speakers have given a series of TED talks and this work aims to give a text analysis of the words spoken by these 2 different speakers: David S. Rose and Tierney Thys. David S. Rose is an expert on business pitch. Rose’s talk provides valuable insights into how to deliver an effective pitch to a VC. Focusing on the problem you’re solving, being clear and concise, and knowing how once numbers can increase the chances of securing funding for his /her startup. Thys on the other hand is a Marine Biologist. Thys’ talk provides a fascinating insight into the world of the giant sunfish and highlights the importance of protecting the ocean’s biodiversity. By using innovative technologies and sharing her experiences with others, Thys hopes to inspire greater awareness and action to protect the ocean and its inhabitants. This work aims to analyse the words spoken by the 2 speakers, check for comparisons in the words and give an insight into the relationship in the words spoken by the 2 of them by using several analytical methods in r.
I delved into the fascinating world of language analysis by analyzing the most frequently used words of two speakers in a dataset called “ted_talks”. To kick things off, I loaded all the necessary packages and made sure the “dsEssex” package was installed. After a bit of prep work, I dove right into the data set, examining the first few rows of the data. Using the unnest_tokens() function from the tidytext package, I was able to effortlessly tokenize the text, remove stop words, and calculate the frequency of each word for each speaker. The resulting top 10 most spoken words were showcased in a stunning bar plot created with the ggplot2 package. But I wasn’t content to stop there! I took things up a notch by creating a mesmerizing word cloud, featuring the top 25 most spoken words for each speaker. To combine the most spoken words of both speakers, I even created a new variable called “person” that cleverly merged their names. The result was a beautiful bar plot highlighting the 10 most frequently used words by both speakers. To add even more depth to my analysis, I utilized the get_sentiments() function from the tidytext package to extract the sentiment for the top words. I then computed the odds ratio and log of the odds ratio of the words, generating a compelling graph that plotted the sentiment against the log odds ratio.
The fist thing i did was to tokenized the word of each of the speaker and i removed the and remove the stop words which give the speakers. The resulting table show the majors words spoken by each speakers with the number of times each words were spoken. Tierney most spoken words is ‘little’ which she said 25 tines while that of David is ‘know’ which was said 45 times. Other words with higer frequency by each speakers are also shown in the 2 tables.
The bar chat shows in a glace the 10 most spoken words by each speaker. just like the table,“Just” is the most spoken word by Tierney while “Know” being that of David.
I bounded the rows of words and frequency for the 2 speakers and give a bar chat showing the comparison of the first then words spoken. The most intresting thing to see in this plot is the word “Know” appears in the 10 most spoken words of the 2 speakers and can be clearly seen from the plot
From the first 2 tables, we can see that: The most frequently expressed sentiment by both David and Tierney is “positive”, with 63 and 77 counts, respectively.The next most frequently expressed sentiment is “trust”, with 34 counts by David and 41 counts by Tierney. David expresses more “joy” sentiment (20 counts) than Tierney (36 counts), while Tierney expresses more “negative” sentiment (45 counts) than David (18 counts).Tierney expresses more “anger”, “disgust”, “fear”, and “sadness” sentiment than David, as shown by the higher count for these sentiments in the Tierney column compared to the David column. David expresses more “anticipation” sentiment than Tierney, as shown by the higher count for this sentiment in the David column compared to the Tierney column.
Based on the 3 table, we can see that: David is more likely to express “anticipation” and “positive” sentiment, as shown by the negative odds ratios and negative log odds ratios. Tierney is more likely to express “disgust”, “fear”, “anger”, and “sadness” sentiment, as shown by the positive odds ratios and positive log odds ratios. There is no significant difference between the two persons for “joy”, “negative”, “surprise”, and “trust” sentiment, as shown by the odds ratios close to 1 and log odds ratios close to 0. This is also shown the bar chart showing the comparison of the Sentiment and Log OR
## # A tibble: 535 × 4
## word person n sentiment
## <chr> <chr> <int> <chr>
## 1 absolute David 1 positive
## 2 actual David 1 positive
## 3 ahead David 1 positive
## 4 alive David 1 anticipation
## 5 alive David 1 joy
## 6 alive David 1 positive
## 7 alive David 1 trust
## 8 applause Tierney 1 joy
## 9 applause Tierney 1 positive
## 10 applause Tierney 1 surprise
## # ℹ 525 more rows
## # A tibble: 10 × 3
## sentiment David Tierney
## <chr> <int> <int>
## 1 anger 5 17
## 2 anticipation 26 36
## 3 disgust 4 16
## 4 fear 8 28
## 5 joy 20 36
## 6 negative 18 45
## 7 positive 63 77
## 8 sadness 9 22
## 9 surprise 12 18
## 10 trust 34 41
## # A tibble: 10 × 5
## sentiment David Tierney OR log_OR
## <fct> <int> <int> <dbl> <dbl>
## 1 anger 5 17 2.07 0.726
## 2 anticipation 26 36 0.798 -0.225
## 3 disgust 4 16 2.44 0.891
## 4 fear 8 28 2.17 0.775
## 5 joy 20 36 1.07 0.0714
## 6 negative 18 45 1.55 0.441
## 7 positive 63 77 0.642 -0.444
## 8 sadness 9 22 1.48 0.391
## 9 surprise 12 18 0.882 -0.125
## 10 trust 34 41 0.674 -0.394
Finally, the word comparison of the 2 speakers were shown on a scatter plot which compares the word frequencies used by two speakers, allowing us to visually identify any words that are used more frequently by one speaker than the other. The red dashed line also represents a hypothetical scenario where both speakers use the same number of words. Here it is clearly seen that ““Back” and “Think” are the 2 words that falls into this category
Email: latonaopeyemi89@gmail.com