Why Every Social Network Today Would Ban Shakespeare & Report Him As A Dangerous Subversive!

A Short Analysis of Sentiment Analysis & Emotion Recognition

Ted Gross
Towards Data Science

--

Copyright © 2021, All Rights Reserved by the Author

Imagine

Just imagine what would happen based upon the current AI algorithms based on sentiments and emotions used in Social Networks today, when the following post written by a new playwright by the name of William Shakespeare hits their systems:

“The first thing we do, let’s kill all the lawyers.” #legal #lawyers #killthelawyers

Good old Will is just trying to create buzz on his new play Henry VI, (self-published of course, because no publisher or literary agent would answer his query letters.)

The various social network algorithms would first pick up the word “kill” and then analyze the entire statement. The algorithms would conclude that this is an evident “emotion” of hate, and Shakespeare is spreading dangerous rhetoric. Without a doubt, he would be banned and probably reported to the police for advocating murder.

Sentiment Analysis & Emotion Recognition

Three basic sub-factors must be considered for those not immersed or familiar with the science of Sentiment Analysis & Emotion Recognition (SAER¹). I do not intend to enter an extensive description into Machine Learning (ML), Natural language processing (NLP), Pattern Recognition (PR), Deep Learning (DL), or any other myriad of constructs that are part of modern Artificial Intelligence (AI) — all effect SAER. These subjects should demand clear academic writing and research, and Medium is not the place for such articles.

The three basic sub-categories I will be dealing with over a period, divided into short articles (and based upon my academic article listed at the end of this piece) when approaching SAER is as follows:

  1. Analysis of what was written and posted within context.
  2. A deep dive into the context
  3. The need to analyze more than just “text” as our world has adopted many communication modes, including emoticons, videos, stories, pictures, and voice.

This piece is to elucidate the difficulties of the first section — analysis of what was written and posted within context. One needs to understand what confronts the Data Scientist, the resulting algorithms, and the companies attempting to analyze what was meant by the post being evaluated.

The Difficulty of Attaining A Precise Definition

To many ears, the terms ‘sentiment analysis’ (SA) and ‘emotion recognition,’ (ER) — together, SAER — sound like they relate to some contemporary psychological theory rather than a method of conversation and expression analysis under the umbrella of NLP. Yet what makes this area of technological exploration so fascinating is that the rule-based system it attempts to devise is based on psychological reactions.

Using data science to convert the psychology of human interaction and behavior into bits and bytes is no small task — any fluctuation in tone or use of supplementary words or other forms of communication to depict an emotion or sentiment can cause a drastic change in meaning.

Most statements, declarations, or conversations will usually involve some emotion or sentiment expression, no matter the delivery mode. Interpreting these expressions so that analytical data systems can ingest such information via their dictionaries, rules, and theorems is vital to any organized system’s success.

The actual definition of SAER is still up for debate, although computational analysis for such data has been around for a few years. According to Wikipedia, SA is ‘also known as opinion mining or emotion AI.’ This definition is misleading, as it confuses sentiment with emotion — an essential detail because SA and ER require distinctly different forms of analysis. Many scholarly articles present mathematical formulas and decision trees arriving at a fundamental, possibly primitive nature of SA.²

Treating ER as an integral part of SA will lead the presented analytics, based upon the same parameters and algorithms, to encompass both emotion and sentiment. However, SA and ER should not be combined into a single entity. Instead, SA and ER are discrete models that must be differentiated when used within data analytics. By ignoring the variation between the two, any analysis will usually result in misleading or erroneous interpretations.

The Dilemma

To better understand the difference between ‘emotion’ and ‘sentiment,’ a quick look at their respective definitions is insightful. ‘Emotion’ is defined as:

‘an affective state of consciousness in which joy, sorrow, fear, hate, or the like, is experienced, as distinguished from cognitive and volitional states of consciousness.’³
Or:
’a conscious mental reaction (such as anger or fear) subjectively experienced as strong feeling usually directed toward a specific object and typically accompanied by physiological and behavioral changes in the body.’⁴

‘Sentiment,’ meanwhile, is more challenging to define:

‘an attitude toward something; regard; opinion; a mental feeling; emotion: a sentiment of pity; refined or tender emotion; manifestation of the higher or more refined feelings; exhibition or manifestation of feeling or sensibility, or appeal to the tender emotions, in literature, art, or music; a thought influenced by or proceeding from feeling or emotion; the thought or feeling intended to be conveyed by words, acts, or gestures as distinguished from the words, acts, or gestures themselves.’⁵
Or:
‘an attitude, thought, or judgment prompted by feeling: PREDILECTION … a specific view or notion: OPINION’.⁶

In a persuasive article on this topic, Nada Allouch defines the difference between sentiment and emotion as follows:

‘While the first one [sentiment analysis] uses a simplified binary categorization, the latter [emotion recognition] relies on a deeper analysis of human emotions and sensitivities. This method highlights the nuances between the different feelings readers express. [It is] a more meticulous, thorough look into the degrees and intensities associated with the deviations of each emotion … Unlike sentiment analysis, emotional analysis [AKA emotion recognition] is inclusive and considerate of different variations of human mental subjectivities.] [It is] usually based on a wide spectrum of moods rather than a couple of static categories. Inside positive, it detects specific emotions like happiness, satisfaction, or excitement -depending on how [it is] configured. Emotional analysis goes a step further into audiences’ motives and impulses. It gives valuable and exact insights that are easily transformed into actions.’⁷

ER is more evident to our minds than SA as from birth, and our training includes emotional recognition and expression. SAER is not an exact science for which there is an absolute classification. Many definitions will consist of ML, NLP, DL, PR, and the oft used and abused AI terminology. If this were not enough, one must include stemming, lemmatization, classification, entailment, semantic relatedness, semantic textual similarity, and paraphrase detection, to name just a few of the sciences under the umbrella of NLP and ML.

While the above definitions are legitimate and deserve inclusion in any thorough description or attempt at establishing a precise delineation for SAER, data scientists, theorists, and social networking gurus are still at odds over what and how SAER can exploit any analysis.

Much of the published work concentrates on Twitter feeds, attempting to assess the positive or negative aspects and tweets’ tones. While this is a starting point, under no circumstances does it cover even the essential elements of SA nor the actual power it can offer to almost any business, organization, or social network in understanding its customers and members.

Among data scientists, there remains a distinct lack of consensus regarding an exact definition of SAER. Indeed, it is possible to spend days looking at journals, books, and internet articles, finding different and layered delineations for SA and ER.

Why Does the Differentiation Between Emotion and Sentiment Matter?

Why does it matter? Who cares? What difference would be made by categorizing terminology or conversations as emotion or sentiment to data analytics, marketing, or the future of any technology?

If one were to post “I love my children,” the algorithms of SAER are simple. This statement does not demand a significant amount of science to know the message expresses emotion from a parent to a child or children.

However, differentiating sentiment from emotion is probably one of the most important distinctions made in marketing. When a customer expresses an emotion such as ‘I hate your product,’ changing that emotion is not just challenging, it is often a waste of effort and funds. Return on investment (ROI) would make such an effort a non-starter. Emotions are tricky and unpredictable, yet part of human nature. They do not easily lend themselves to change via direct appeal or marketing campaigns. The best one can hope for is an explanation of why the product has become the object of hate, helping plan improvements to the product.

A sentiment, such as ‘The customer service is dreadful,’ lends itself to reaction and alteration, unlike a straightforward emotion. Understanding the context in which this statement appears is not a challenging task. The problem the customer was facing requires attention to using appropriate marketing to change the customer’s sentiment.

While implementing SAER, context becomes decisive, and the separation of SA from ER is crucial. The computer algorithms, mathematical formulas, and decision trees that form the analytical system must understand what, why, how and under what circumstances the utterance of a statement occurred. These are the same considerations that people’s minds process when listening to a real-time human conversation.

An example using Twitter is relevant because companies mine tweets with almost obsessive compulsion. As a result, a tweet from a user which states: ‘I hate this product,’ would send everyone from the chief executive down to the junior marketer into meltdown. Questions such as ‘why?’ and ‘who is this person?’ and e-mails and texts would fly back and forth at a dizzying rate demanding that staff find the underlying cause of the tweet.

Why? Because once the tweet flies into the ether of an electronic medium, the algorithms, data stores, and formulas take over, creating an analysis that will undoubtedly mark the post as ‘highly damaging’. In marketing terms, this implies unacceptable failure.

Simultaneously, the system might see the tweets: ‘Problem solved, but what a mess!’ or ‘I love this product, but they screwed up the last version,’ but not identify them as flagging an existing problem. What the system will see is the determiner of ‘problem solved’ — all else becomes noise. Alternatively, the ‘love’ of the product has an explicit expression, and we all know love is the ultimate emotion.

What was the mess? What happened? It has no context, so who knows? Who cares? What happened in the last version to get the customer to express negativity? What part of the latest version is problematic? What does not work? (One of the best examples of this is to browse through user comments on the Google Play Store, as companies often go to great lengths to respond to dissatisfied customers and put their negative comments in some sort of context.)

When the system sees a positive emotion, it may overlook the potential negative sentiments and questions mentioned above during the analysis. However, the ‘mess’ and ‘negativity’ do matter. Although the context remains crucial, that same customer now has mixed sentiments towards the product and company.

For marketers, this is precisely the category of customer that the company should worry about. The customer who has already decided that they hate the product, (a clear emotional reaction,) will go to its competitors. However, the customer who is expressing a negative sentiment has an underlying emotional response that can be changed. This customer is the one that marketing should target to create a positive perception of the product.

Differentiating between sentiment and emotion can be critical for continued existence in terms of its marketing, customer retention, and maintenance of a workforce in tune with customers. Almost every department will feel the effects of SAER and understand if they are dealing with sentiments or emotions when reacting to different situations.

Is William Shakespeare Really A Subversive?

The line, “The first thing we do, let’s kill all the lawyers,” is classic Shakespeare. While it does not contain the word ‘hate’ — nor any of its synonyms — it seems to express the sentiment of loathing towards lawyers and the emotion of hatred by calling upon the audience to kill the lawyers. With this call to “kill,” our SAER algorithms will analyze the sentiments and conclude that this emanates from the emotion of hatred. Shakespeare’s sentiments are interpreted as an emotion that would be considered a call to murder and probably a hate crime!

However, before concluding what Shakespeare’s line actually means, consider the following:

‘We’ve all heard the line: “The first thing we do, let’s kill all the lawyers”. Shakespeare wrote it in 1598 (Henry VI, Part 2) and people are still saying it today … Killing all the lawyers is a provocative line, for sure. Except according to those who study such things, the line wasn’t shocking at all. In fact, it was a good old fashioned joke. “In today’s world, many people can spout a line or two from the Bard to earn social credit, but few of them are aware of the full context of the line itself,” says Dr. Jennifer McDermott, an English professor at John Abbott College in Montreal, who wrote her thesis on Shakespeare. ‘Most notorious among these, is “first thing we do, let’s kill all the lawyers.”’⁸

Et voila — by understanding who Shakespeare was targeting when writing this line, the meaning flips⁹; context turns hate into a joke. If one were to run this line through SAER, ER would probably label it as hate. SA might be kinder and call it deep loathing.

A law firm’s public relations department would mark this possible customer as a non-starter. But what if it were used, as initially intended, as a joke? Possibly even a self-effacing one made by another lawyer? How would one know? How would the algorithm categorize this statement? What is the ER? What is the SA?

The majority consensus and lexicons in an algorithm may lead to erroneous conclusions. Imagine this statement originating in a tweet (and not with Shakespeare) before appearing in hundreds of thousands of retweets all around the globe — how would each recipient construe it? A joke or a call to arms against the legal system? Context is king. Without considering context, someone might just launch an army to kill all the lawyers after all.

Other Critical Factors

Now we can take a deep sigh of relief and allow ourselves to still read, educate ourselves and our children with Shakespeare’s genius and understand his humor in context. No need to call the police or label him as anything else than a great playwright.

As mentioned at the beginning, in two upcoming articles, I will deal with the deeper complexities of SAER with:

  • a deep dive into the context
  • The need to analyze more than just “text” as our world has adopted many communication modes, including emoticons, videos, stories, pictures, and voice.

If you wish to read the actual Academic article discussing all these areas of SAER, please read below on how to download or request it.

Meanwhile, be careful what you post!

Rasheedhrasheed, CC BY-SA 4.0, via Wikimedia Commons

References:

  1. SAER is an acronym created by the author. It has not yet been accepted in the AI community.
  2. Alaoui, IE, Gahi,Y., Messoussi, R., Chaabi,Y., Todoskoff,A. and Kobi,A. (2019) ‘A novel adaptable approach for sentiment analysis on big social data’, Journal of Big Data, Vol. 5, available at https://doi.org/10.1186/s40537-018-0120-0
  3. Dictionary.com (n.d.) ‘Emotion’ available at https://www.dictionary.com/browse/emotion
  4. Merriam-Webster (n.d.) ‘Emotion’ available at https://www.merriam-webster.com/dictionary/emotion
  5. Dictionary.com (n.d.) ‘Sentiment’ available at: https://www.dictionary.com/browse/sentiment
  6. Merriam-Webster (n.d.) ‘Sentiment’ available at https://www.merriam-webster.com/dictionary/sentiment
  7. Allouch, N. (2018) ‘Sentiment and emotional analysis: the absolute difference’, available at https://www.emojics.com/blog/emotional-analysis-vs-sentiment-analysis/
  8. Chisling, A. (2017) ‘The first thing we do, let’s kill all the lawyers.’ Wait … What? In honor of Shakespeare’s
    453rd birthday (more or less), we take a look at one of his most famous — and often misunderstood — quotes’, available at https://medium.com/@avajoy/the-first-thing-we-do-lets-kill-all-the-lawyers-waitwhat-b2cbd34c8f1f
  9. Finkelstein, S. (1997) ‘The first thing we do, let‘s kill all the lawyers’ — it’s a lawyer joke’, available at http://www.spectacle.org/797/finkel.html

The article above is a redacted & condensed version of my original Academic article, ‘Sentiment analysis and emotion recognition: Evolving the paradigm of communication within data classification,’ which was first published in “Applied Marketing Analytics” Volume 6 Number 1, a journal of Henry Stewart Publications. For a PDF of the entire article, you can use ResearchGate, Google Scholar, figshare, or contact the author directly on LinkedIn. In all cases, if you cite this or the full article, full attribution to the original author is required.

About the Author: Ted Gross served as a CTO & VP of R&D for many years with expertise in database technology concentrating on NoSQL systems, NodeJS, MongoDB, Encryption, AI, Innovation & Chaos Theory. He has, as well, expertise in Virtual World Technologies & Augmented Reality. Ted has and continues to write many articles on technological topics in professional journals and online @ Medium & LinkedIn. He is also an author of literary fiction, children’s books, and various non-fiction articles. His short story collection, “Ancient Tales, Modern Legends,” has received excellent reviews.

Ted can be reached via email; Twitter (@tedwgross); LinkedIn; Medium

--

--

Futurist, AI Architect, Lecturer & Teacher. CEO & CoFounder of If-What-If a Startup in AI Architecture & the Metaverse. Published in various Academic Journals.