Glypse

Emotion Classification

Emotion analysis adds detail to sentiment by showing which reactions appear in social posts and how they change as a story develops.

When you follow a news story on social media, the emotions people express help explain how they are responding. Suppose a club announces that its captain is leaving. Supporters might express affection for the player alongside anger at the club's decision, sometimes within the same post. The discussion could remain broadly negative even as the reasons for that response change.

Emotion classification helps you compare these reactions across a large collection of posts. It can show whether anger is becoming more common or whether worry about the team's future is taking up more of the conversation. Reading the posts behind those patterns connects the emotion labels to what people are discussing. Together, the labels and the text help you understand both the mix of reactions and what prompted them.

What is emotion classification?

Emotion classification assigns categories such as joy, anger, fear, or sadness to text. Software reads a message and predicts which emotion labels fit its language. This task is also called emotion analysis or emotion recognition in text. Counting the labels across many messages shows which reactions appear in a conversation and how often.

Suppose a player announces her retirement and a post says, “I'll miss watching her play. She's been my favorite for years.” It combines affection with a sense of loss, so a classifier might assign Love and Sadness. A reply saying “I can't wait to see her coaching” looks forward to her next role and might receive Anticipation.

A hypothetical post about missing a retiring player receives Love and Sadness, while a reply looking forward to her coaching receives Anticipation. Both use the same set of seven emotions plus Neutral, with more than one label allowed per post.

With a few posts, a reader can recognize these differences directly. Across thousands, a classifier applies the same categories throughout the collection. Someone following a company can then investigate whether a rise in discussion comes from excitement about its products or worry about its finances, with the labeled posts available to explain what prompted each reaction.

How do sentiment vs emotion labels differ?

Sentiment analysis classifies the positive, negative, or neutral tone of text. Emotion analysis identifies more specific reactions, such as anger, sadness, affection, or anticipation. Two messages can have the same sentiment while expressing quite different emotions.

Suppose a club announces that its captain will miss the rest of the season. A classifier could label these hypothetical reactions as follows:

ReactionSentimentPossible emotion
“The club knew he was injured and played him anyway. Disgraceful.”NegativeAnger
“I'm heartbroken that his season has ended this way.”NegativeSadness
“I'm worried he won't recover in time for next season.”NegativeFear
“So happy to hear the surgery went well.”PositiveJoy
“He'll always be my favorite player.”PositiveLove

The first three posts all have negative sentiment, while their emotion labels separate blame, disappointment, and concern about recovery. If worried posts give way to angry ones, the negative total could stay steady even as the discussion turns toward who was responsible for the injury.

Each bar groups 400 hypothetical negative posts about an injured captain by emotion, with one label per post. Fear falls from 240 to 60 as Anger rises from 60 to 240, leaving the negative total unchanged.

Some emotion categories can accompany either positive or negative sentiment. Anticipation covers expectation about something approaching, whether someone is looking forward to a new season or dreading an upcoming hearing. The surrounding words tell us whether that prospect is welcome.

How many emotions are there?

Ekman's familiar list of emotions has six basic categories, Plutchik's model has eight primary emotions, and Cowen and Keltner identified 27 categories in reported feelings. These counts come from different ways of studying emotion, including people's judgments of faces, their reports of feelings, and their interpretations of text.

List or frameworkNumber of categoriesWhat it classifies or organizes
Ekman's basic emotions6, with contempt discussed as a seventhEmotions associated with facial expressions in cross-cultural research
Plutchik's model8 primary emotionsA theory of relationships, intensity, and mixtures among emotions
Willcox's Feeling Wheel6 central feelings, with more specific words around themVocabulary for recognizing and communicating personal feelings
Cowen and Keltner's study27, including awe and nostalgiaPeople's reported feelings while watching videos
GoEmotions27 plus Neutral, including gratitude and annoyanceHuman labels on Reddit comments, used to train and test text classifiers
SemEval's Affect in Tweets11 emotions, with neutral or no emotion as another optionHuman labels on tweets for a text-analysis research competition
Social Intelligence dashboard's labels7 emotions plus NeutralLabels on public Bluesky posts, counted across matching results

What are the basic emotions?

Paul Ekman's 6 basic emotions are happiness, sadness, anger, fear, disgust, and surprise. His account uses “enjoyment” for happiness and includes contempt in its seven-emotion list. The six grew out of cross-cultural research on facial expressions, including Ekman and Friesen's study in which people matched photographs of posed faces to stories.

Whether a facial expression reliably identifies a person's feelings remains disputed.

What is an emotion wheel?

An emotion wheel places related feelings near one another and shows differences in intensity. The Plutchik wheel of emotions uses eight primary emotions in four opposing pairs: joy and sadness, anger and fear, trust and disgust, and anticipation and surprise.

The wheel groups milder and stronger versions of a reaction, such as annoyance, anger, and rage. It also shows mixtures, including love formed from joy and trust. Compared with Ekman's six, its primary categories add trust and anticipation, which Plutchik calls acceptance and expectancy in his account.

Plutchik's wheel places eight primary emotions in four opposing pairs. The three rings represent increasing intensity toward the center, with annoyance at the outer edge of the anger petal and rage in its innermost ring.

The feelings wheel developed by Gloria Willcox helps people recognize and communicate their feelings. Its six central feelings are mad, sad, scared, joyful, powerful, and peaceful, with more specific words in outer rings.

What are the 27 emotions?

Alan Cowen and Dacher Keltner's study identified 27 categories in people's reported feelings while watching 2,185 short videos. The study found gradual transitions between categories, including a progression from anxiety through fear and horror to disgust.

The study's list of 27 emotions is:

  • Admiration
  • Adoration
  • Aesthetic appreciation, a response to beauty
  • Amusement
  • Anger
  • Anxiety
  • Awe
  • Awkwardness
  • Boredom
  • Calmness
  • Confusion
  • Craving
  • Disgust
  • Empathic pain, distress at someone else's suffering
  • Entrancement, a feeling of being captivated
  • Excitement
  • Fear
  • Horror
  • Interest
  • Joy
  • Nostalgia
  • Relief
  • Romance
  • Sadness
  • Satisfaction
  • Sexual desire
  • Surprise

What is GoEmotions?

GoEmotions is an emotion classification dataset of roughly 58,000 English Reddit comments labeled by people. Its 27 emotions plus Neutral include gratitude, annoyance, approval, and remorse. This differs from Cowen and Keltner's list of emotions reported during videos, which includes nostalgia and aesthetic appreciation.

Even shared names can cover different ground. The Affect in Tweets dataset, created for the SemEval-2018 text-analysis research competition, groups annoyance and rage under Anger. GoEmotions gives annoyance its own category. The same mildly irritated message can therefore count as anger in one label set and annoyance in another.

What does Neutral mean in emotion classification?

Neutral means that no emotion from the available categories has been identified in the text. In the GoEmotions dataset, human readers chose Neutral when they were unsure whether a comment expressed any emotion. A factual post giving a match's kickoff time could receive Neutral, as could an emotional post the classifier failed to recognize.

The separate sentiment classification judges positive and negative tone. A count of posts with none of the dashboard's seven emotions assigned can therefore differ from the count labeled neutral for sentiment.

Ekman's six basic emotions, Plutchik's eight primary emotions, and the Social Intelligence dashboard's seven emotions plus Neutral share five categories. Love counts as a label in the dashboard and as a mixture of joy and trust in Plutchik's model.

How does emotion detection in text work?

Software detects emotions in text by applying word lists, learning from examples labeled by people, or following instructions that define the categories.

  • Word lists associate words with emotions. The NRC Emotion Lexicon links English words with eight emotion categories and positive or negative sentiment, using associations supplied by people. Counting these words makes it possible to see which terms contributed to a result.
  • Trained classifiers learn from text paired with human labels. They can recognize combinations of words, including emotional expressions that never name an emotion. “I've refreshed the withdrawal page all morning. My savings are still stuck” can convey fear without saying “fear” or “afraid.”
  • Prompted language models receive instructions defining the categories to assign. The instructions can specify whether to identify the writer's expression or any emotion mentioned in the text, including a quotation about someone else.

Context changes how an emotion or sentiment classifier interprets a word. “I'm afraid the exchange will fail” and “I'm no longer afraid the exchange will fail” contain the same emotion word. A plain word count treats them alike, while a system that recognizes “no longer” can identify the change in meaning.

Counting “afraid” assigns Fear to both hypothetical posts about an exchange failing. Reading “no longer” removes that label from the second post because the writer says the worry has passed.

Can ChatGPT detect emotions?

ChatGPT can assign emotion labels to text from a prompt that defines the categories.

In Kocoń and colleagues' 2023 evaluation, an early ChatGPT version scored about 0.26 on 1,000 GoEmotions examples, compared with 0.53 for the best specialized model they tested. Those are macro F1 scores, which balance missed and incorrect labels across categories. A 2024 comparison by Bucher and Martini also found that specialized classifiers outperformed prompted GPT-3.5, GPT-4, and Claude Opus on the classification tasks tested, including emotion detection.

Which emotion analysis tools can you use?

Emotion analysis tools include social-listening services for collected posts and APIs for text you submit. They differ in whether they return one label per message, several labels, or a score for each emotion.

ToolText analyzedEmotion output
Brandwatch ListenEnglish social-media mentionsOne of six emotions per mention: anger, disgust, fear, joy, surprise, or sadness
Social Intelligence dashboardPublic Bluesky posts matching a query and time rangeSeveral labels per post are possible; charts show counts and shares across seven emotions plus Neutral
IBM Watson Natural Language UnderstandingSubmitted text, analyzed as a document or around specified phrasesAn emotion detection API with zero-to-one scores for anger, disgust, fear, joy, and sadness

Can AI detect emotions?

AI can identify patterns that people associate with emotional expression in text, faces, and voices. For text, Saif Mohammad's research on automatic emotion recognition separates what a writer feels, what they intend to convey, and what readers perceive. A model trained on outside readers' labels learns their interpretation. A writer might express confidence while feeling anxious or quote frustration they do not share.

A sentence can report several people's reactions. “Shareholders are furious, although I think the board made the right decision” reports shareholders' anger while expressing the writer's approval. Researchers treat identifying the person described as experiencing an emotion as a separate task from classifying the text.

A large green-marked social post contains a smaller red-marked quoted post on a thin blue paper layer. A grey conversation card sits partly behind the larger message.

The red quotation inside the green post represents someone else's anger within a message whose writer expresses approval.

How does emotion recognition work with faces and voices?

Face and voice models learn from images or recordings that people have labeled with emotions. Facial emotion recognition uses visible expressions, while voice models use patterns in pitch, rhythm, and sounds such as laughter or sighs. From these examples, a model learns which patterns people associate with each emotion and produces labels or scores for new inputs. Hume's expression models, for example, estimate how people would interpret the expressions they see or hear.

Often called emotion AI, this work belongs to affective computing, which studies how computers can recognize and respond to emotion. For faces, Barrett and colleagues' review concluded that movements vary too much across people, cultures, and situations to reliably identify a particular emotional state. A scowl can communicate several emotions or information unrelated to emotion.

Can a post express multiple emotions?

A post can express several emotions, including reactions that pull in different directions. Multi-label emotion classification allows several categories to be assigned to the same text. A single-label system must select one category even when the message contains mixed emotions.

“Great to see him back in training. I'm still furious they made him play on that ankle” combines joy about recovery with anger about the decision to let an injured player compete. A whole-post classifier can assign both labels. Reading the sentence shows which subject receives each reaction.

A single-label classifier assigns only Anger to this hypothetical post about a player's return to training, leaving its expression of joy uncounted. A multi-label classifier can count the same post under both Joy and Anger.

Multiple emotions can also accompany the same prospect. “I can't wait for the final, but I'm terrified we'll lose” combines anticipation with fear. In a multi-label analysis, that post contributes to both counts.

Counting multiple emotions changes how emotion percentages are calculated, because one post can contribute more than one label assignment.

What do emotion percentages mean?

Within one collection, emotion percentages can measure the share of posts carrying a label or the share of all label assignments belonging to that category. These calculations give different answers when a post can carry several emotions.

Consider a hypothetical collection of ten posts after a match:

  • Five posts carry Joy only.
  • Two carry both Anger and Sadness.
  • Two carry Sadness only.
  • One carries Neutral only.

The ten hypothetical posts have twelve label assignments because posts 6 and 7 each carry both Anger and Sadness.

There are ten posts and twelve label assignments. Each of the two posts with mixed emotions contributes two assignments. Counting them gives the following emotion distribution:

LabelPosts carrying the labelShare of the 10 postsShare of the 12 assignments
Joy550%41.7%
Anger220%16.7%
Sadness440%33.3%
Neutral110%8.3%
Sum across labels12120%100%

Joy appears on five of the ten posts, so its share of posts is 50%. The angry posts also count among the sad posts, which brings the sum across categories to 120%. Each percentage answers how often that label appears, and the same post can contribute to several percentages.

The share of label assignments counts Joy's five assignments out of the twelve assigned across all posts, giving 41.7%. In a pie chart such as the dashboard's emotion distribution, these shares add to 100%. Its slices divide assignments, while the underlying posts can belong to several slices.

Joy appears on five of the ten hypothetical posts, giving it 50% in the bars and 41.7% of the twelve assignments in the donut. The shares of posts total 120% because labels overlap, while the donut divides all assignments into shares that total 100%.

One author can contribute several posts. A frequent writer therefore has more influence on these percentages than someone who posts once, just as concentrated posting affects sentiment totals.

What does an emotion score mean?

An emotion score may measure confidence in a label, the intensity of an expression, or how common a label is across a collection. For example, IBM's emotion scores run from zero to one. A higher score means the model considers the text more likely to convey that emotion.

MeasurementQuestion it answersExample
ConfidenceHow strongly does the model support this label?A high Sadness score for a clearly sad sentence
Emotion intensityHow strongly does the text express the emotion?“I'm devastated” expresses greater sadness than “I'm a little disappointed”
Collection percentageHow common is this label?Fear appears on 30% of the posts

A classifier might give Sadness a confidence score of 0.95 for “I'm a little sad the season is over.” The sentence expresses mild sadness clearly. High confidence can therefore accompany low intensity. In collection percentages such as those in the dashboard's emotion breakdowns, every post with a label counts equally, however strong its language.

Both hypothetical posts clearly express sadness and receive a confidence score of 0.95. Intensity scores of 0.25 for “a little sad” and 0.90 for “devastated” measure the strength of the expression.

Confidence scores also need testing before they can be read as reliable probabilities. If predictions scored around 0.90 are correct about 90% of the time on comparable examples, they are well calibrated. Guo and colleagues found substantial miscalibration in neural networks tested on image and document classification.

Measuring intensity needs judgments about the strength of the expression. The Emotion Intensities in Tweets dataset collected these separately for anger, fear, joy, and sadness.

Some classifiers turn scores into labels using a cutoff. Raising that cutoff can reduce the number of assigned labels even with the text unchanged. A chart can therefore change because the classification rules changed, as well as because the discussion changed.

How accurate is emotion detection?

Emotion detection can match human labels closely for some emotions, such as gratitude, and poorly for others, such as relief. Grouping related emotions into broader categories can improve agreement, while slang and missing context can make judgments harder. Human readers disagree over some labels too.

On English Reddit comments, the original GoEmotions classifiers matched human labels more closely with six broader emotions plus Neutral than with 27 emotions plus Neutral. Their macro F1 scores were 0.64 and 0.46 respectively. This measure balances missed and incorrect labels, then averages the result across categories. Higher scores mean closer agreement, with 1 indicating a perfect match.

Performance also varied by emotion. In the 27-emotion test, F1 was 0.86 for gratitude, 0.47 for anger, and 0.15 for relief. The overall score hides those differences, so two categories in one chart can have very different error rates.

The 2020 GoEmotions results on Reddit comments give F1 scores of 0.86 for gratitude, 0.47 for anger, and 0.15 for relief, with higher scores meaning closer agreement with human labels. The vertical line marks the macro F1 of 0.46, the average across all 27 emotions plus Neutral.

F1 differs from the percentage of correct classification decisions. A tool can make many correct decisions by leaving a rare label off most posts, even while substantially overstating how often that emotion appears.

Suppose reviewers label 50 of 1,000 posts as expressing fear. In this hypothetical test, a classifier finds 40 of those posts and misses ten. It also wrongly labels 45 other posts as Fear.

Classifier resultReviewers labeled FearReviewers did not label Fear
Assigned Fear40 correct detections45 false detections
Did not assign Fear10 missed detections905 correct exclusions

The system makes the correct Fear-or-no-Fear decision on 945 of 1,000 posts, giving 94.5% accuracy. Most of those correct decisions come from leaving Fear off posts where reviewers also left it off.

Its reported Fear count is 85, however, compared with the reviewers' 50. The chart would show 8.5% of posts carrying Fear where the reference share was 5%. The added false detections outnumber the missed detections.

A hypothetical classifier correctly decides whether to assign Fear on 94.5% of 1,000 posts. Its 45 false detections outnumber the ten missed detections, bringing its Fear count to 85 against the reviewers' 50.

Two other measures reveal what happened:

  • Precision asks how many assigned labels were correct. Of the 85 Fear labels, 40 agree with the reviewers, giving about 47% precision.
  • Recall asks how many reference examples the system found. It detected 40 of the reviewers' 50 Fear posts, giving 80% recall.

F1 combines precision and recall, falling when either is low. In this example it is about 0.59, which makes the missed and incorrect Fear labels more apparent than the 94.5% accuracy figure does.

The kind of text also affects emotion detection accuracy. Sports fans might praise an athlete with “sick performance,” while “wonderful timing” could be sincere or sarcastic. A reply may rely on a previous message. If many posts use the same slang or joke, a classifier can make the same mistake repeatedly across the collection.

The human labels used for testing can be unsettled too. GoEmotions reported agreement of about 0.75 for gratitude and 0.10 for grief using Cohen's kappa, which adjusts for agreement expected by chance. On that measure, 0 means chance-level agreement and 1 means complete agreement. People differed much more over whether a comment expressed grief.

Increasing the sample size can leave a systematic error intact. Multiplying every count in the hypothetical test by ten gives 850 Fear labels among 10,000 posts, while reviewers identify 500. The shares remain 8.5% and 5% because the same kinds of mistakes occur at the same rates.

How do you interpret emotion analysis on social media?

Emotion analysis on social media shows how often labels such as Fear or Joy appear in posts about a subject. A change can come from different reactions to the same news, more discussion of another story, or different people joining the conversation. The matching posts show which developments people are reacting to.

How do you track emotions over time?

Tracking emotions over time involves comparing label counts with their shares of the discussion. An emotion's share in the dashboard's emotion timeline can fall because other labels have become more common, even if its own count stays steady.

Suppose a company announces a product delay. On the first day, 100 posts carry Fear and the matching posts receive 250 label assignments in total. On the next day, 100 posts carry Fear among 500 assignments. Fear's share of assignments falls from 40% to 20%, while its count stays the same. The new assignments could come from excitement about a product demonstration, alongside continuing concern about the company's finances.

The two hypothetical days each have 100 posts labeled Fear. As other labels bring the total from 250 assignments to 500, Fear's share drops from 40% to 20% even though its count stays the same.

If Anticipation leads before an event and Joy leads afterward, the sequence shows a change in the conversation. The posts may come from different people. Reading them can reveal whether the later discussion celebrates the expected announcement or a separate development.

A result with eight Fear labels out of ten assignments has the same 80% share as one with 800 out of 1,000. One additional post can move the smaller result much further, so a high percentage during a quiet period can come from only a handful of posts.

How do you compare emotions across subjects?

Emotion proportions show whether fear or enthusiasm is more common in discussion of one subject than another. The comparison needs the same label set, time window, and percentage calculation for both subjects. Matching percentages can still accompany very different volumes of discussion.

A query for a team name could retrieve match reactions, transfer rumors, and discussion of a sponsor. More transfer discussion can change the overall label mix even if reactions to each story stay steady. Reading the posts reveals which of these stories accounts for the difference.

In a Bitcoin and Ethereum emotion comparison, a post might say, “Can't wait for Ethereum's upgrade. Bitcoin's drop this morning has me worried.” It can match both queries and contribute its whole-post labels to both results. The text separates the excitement about one subject from worry about the other. Shared posts can therefore make the two label distributions resemble each other even when they express different reactions to each subject.

Can emotions on social media predict market prices?

Research has linked increased anxiety in social posts with weaker later stock-index returns. The relationship weakened when expected market volatility was taken into account, and the authors left open whether it could support a trading strategy. The study did not test prediction-market contracts, where the same emotion can accompany opposite expectations about an outcome.

Gilbert and Karahalios analyzed more than 20 million LiveJournal posts alongside the S&P 500 over 174 trading days in 2008. The financial-crisis year gave them little basis for judging how well the relationship would hold in more ordinary conditions. A separate study of Twitter mood and stock prices initially reported forecasting gains that a later investigation could not reproduce.

Suppose a prediction-market contract asks whether a central bank will raise its policy rate at next week's scheduled meeting. These hypothetical posts could both receive Fear:

  • “They'll raise rates again next week. I'm scared my loan will become unaffordable.”
  • “They'll leave rates unchanged next week. I'm worried inflation will keep eating into my savings.”

The first post predicts the contract's Yes outcome, while the second predicts No. Where social discussion is available, reading the posts on research pages linked from Polymarket and Kalshi search can show which outcome a fearful writer expects. Both posts can increase the Fear count because emotional tone and outcome expectations measure different aspects of the text.

Fear accompanies both Yes and No expectations for a hypothetical contract on a central bank rate increase. One writer fears higher loan costs after an increase, while the other fears inflation with rates unchanged.

What does the Crypto Fear and Greed Index measure?

Alternative.me's Crypto Fear and Greed Index combines market and attention indicators, including Bitcoin volatility, momentum, volume, and social-media activity. Its documented social component counts hashtag posts and their interactions. It interprets those conditions on a scale from zero for extreme fear to 100 for extreme greed.

A text-analysis chart showing 25% Fear counts that label on one quarter of the posts, or one quarter of the assignments, depending on its denominator.