Cicero, Jeff Weiner, and Me: A Nerdy Adventure in Public Speaking

Ancient Wisdom Meets Modern Tech (Sort Of)

Nothing is so unbelievable that oratory cannot make it acceptable.

— Cicero, De oratore

Cicero argues about the infinite power of words and explains what it takes to be an excellent oratore. He unrolls the methods and emphasis that practicing the art of public speaking is that it takes to move people’s heart. Despite these words are over 2000 years old, then wisdom remains and people like me struggle to put Cicero’s advises to practice. However I recently found a tool that help me and I wanted to share my story.

AI-powered sentiment analysis tools can reveal the emotional impact of our speech - if any. I delve in this topic after (yet another) boring virtual client review. I looked for tools that could help me out and I found that online grammar tools were useless - I needed words to make my audience feel something. I needed that AI hero that saved me from presentation purgatory and might just turn this nerd into a TED talk sensation. (Well, a guy can dream, right?)

Note that the tool is just a tool, the real solution lays in the words of Ciceo. He explains that the most important thing is to trigger human emotion so as to appeal to the audience. This emotion should come as quickly as possible in the speech. It can also be a rollercoaster of emotions, the more the merrier, as long as the orator drives them.

Work it out with AWS Comprehend

I picked Amazon Comprehend as Natural Language Processing (NLP) tool because offered the best compromise between cost and performance. It’s awesome and its free. While I do not intent to promote this service deliberately, I do want to point out that its ability to extract measurable data from text via a simple python API served my purpose very well. If you want to hear more cheesy words on Amazon Comprehend, listen to AWS (ex)-CEO in this 3-minute video.

The data I am personally interested are key phrases and sentiment. I will be using these to align my speech to Cicero’s guidelines on arrangement and, more importantly, to trigger human emotion so as to appeal to the audience.

Put it to test

I am a great fun of LinkedIn Learning and the course by Jeff Weiner on leadership is one of the best I found there.

Here is a short passage from Jeff’s course: For me, the definition of leadership was the ability to inspire others to achieve shared objectives. And had you asked me about leadership several years ago, this is the answer you would’ve gotten. Jeff is an effective orator and I find him inspiring, let’s see how AWS Comprehend ranks him when compared to one my PhD thesis abstract.

Python code

This simple script runs the analysis and visualizes the results. It follows these three steps:

  1. Import a short text from a txt file.
  2. Passes the text to Amazon Comprehend.
  3. Fetches and visualizes data about the sentiment analysis.
import boto3
import json
import string

# Load file to analyse - - - - - - - - - -
with open("script.txt", "r") as file_opened:
    text = file_opened.read()

# Call Amazon Comprehend  - - - - - - - - - -
comprehend = boto3.client(service_name='comprehend')
compLang = comprehend.detect_dominant_language(Text=text)

# Identify language   - - - - - - - - - -
for lang in compLang.get('Languages'):
    sentiment = comprehend.detect_sentiment(LanguageCode=lang["LanguageCode"], Text=text)
    SentimentScores = sentiment.get('SentimentScore')

Then use pyplot to visualize data:

labels = ['Positive', 'Negative', 'Neutral', 'Mixed']
sizes = [SentimentScores.get("Positive"), SentimentScores.get("Negative"), SentimentScores.get("Neutral"),
         SentimentScores.get("Mixed")]
colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral']
patches, texts = plt.pie(sizes, colors=colors, shadow=True, startangle=90)
plt.show()

Let’s now see the results coming out of this code.

Results

I compared the sentiment analysis of Jeff Weimer’s introduction to his course on leadership to my PhD thesis abstract. The analysis runs in seconds and Jeff scores over 90% positive, leaving little space for neutral sentiment and nearly none for negative. Whereas I leave nearly no space for positive sentiment as over 90% of my talk was neutral. In Cicero’s terms neutral is even worse than negative because it really means no emotions.

Sentimental analysis of Jeff's course opening

Sentimental analysis of my speech closing

Comparing the opening of a course and a technical abstract it is pointless in itself, but this is useful to proven that NLP is a valuable tool to analyze and improve a speech. I did not use a speech to avoid embarrassing myself, but if that was the result of my speech, I would definitively need to rephrase many words of it.

To conclude, speaking of words, by adding few lines of code I could visualize word clouds that drive emotion and the sentiment analysis itself 💪.

image image

Published At
Tagged with
Creative Commons Attribution-ShareAlike (CC BY-SA)