"Sentiment analysis" and "emotion detection" are often used as synonyms, and plenty of tools blur the line. They answer different questions. Sentiment analysis tells you how someone feels on a single good-to-bad scale. Emotion detection tells you what they feel: angry, grateful, confused, afraid, amused. That distinction decides whether a dashboard says "negative reviews rose 12%" or "confusion about checkout doubled while anger stayed flat". Only the second one tells your team what to fix.
This guide explains what each technique measures, the emotion taxonomies you will run into (Ekman, Plutchik and GoEmotions), why modern emotion models are multi-label, and how to pick the right level of detail for your use case.
The short answer
| Sentiment analysis | Emotion detection | |
|---|---|---|
| Question answered | Is this positive or negative? | Which emotions are expressed? |
| Typical output | Label (pos/neg/neutral) or score in [-1, 1] | A score per emotion label (6–28 labels) |
| Granularity | One dimension (valence) | Many categories |
| Mixed feelings | Averaged away or labeled “mixed” | Several emotions scored at once |
| Best for | Trend lines, KPIs, quick triage | Root-cause analysis, routing, research |
| Difficulty | Easier; higher headline accuracy | Harder; rarer classes, more ambiguity |
Put simply: emotion detection is a superset. If you know the emotions, you can compute a sentiment score. If you only know the sentiment score, you cannot recover the emotions.
What sentiment analysis measures
Classic sentiment analysis, also called opinion mining or polarity detection, places text on a single axis from negative to positive. Output comes in three common shapes:
- Categorical: positive, negative, neutral, and sometimes "mixed". Most cloud NLP APIs and fine-tuned classifiers return this.
- Continuous: a score such as VADER's compound score in [-1, 1], or a star rating predicted from 1 to 5.
- Aspect-based: polarity attached to a specific target, such as "battery: negative, screen: positive".
Polarity works well for trend monitoring, because one number per message aggregates cleanly into a daily average, a net score or a share of negative mentions. If you want a refresher on the approaches behind it (lexicons, classical machine learning and transformers), see What Is Sentiment Analysis?
The weakness is compression. "I'm furious, you charged me twice" and "I'm so sad this product is being discontinued" are both strongly negative, but they need completely different responses. One is a billing incident that needs a refund. The other is a loyal customer who could be retained. Sentiment puts them in the same bucket.
What emotion detection measures
Emotion detection (also called emotion recognition from text or affective text classification) assigns text to one or more named emotional states. Instead of a single number you get a vector, such as a score for anger, one for sadness, one for gratitude, and so on. The labels come from a taxonomy, a fixed list of emotions the model was trained to recognise.
Applied to the two examples above, an emotion model would score the first high on anger and annoyance. The second would score high on sadness and maybe disappointment or love. The polarity is the same, but the meaning is different, and so is the right response.
Fine-grained taxonomies also capture states that sentiment cannot express at all. Confusion, curiosity and realization are not really positive or negative, yet they are among the most actionable signals in product feedback. Confusion in onboarding tickets usually points to a UX problem, not an angry customer.
Emotion taxonomies: Ekman, Plutchik, GoEmotions
Which emotions a model can detect depends entirely on the taxonomy its training data was labeled with. Three come up most often.
Ekman's six basic emotions
Psychologist Paul Ekman proposed six basic emotions recognised across cultures from facial expressions: anger, disgust, fear, happiness (joy), sadness and surprise. Many early text emotion datasets and models use this set or a close variant. It is compact and easy to annotate, but coarse. Almost every positive emotion collapses into "joy", so gratitude, admiration, amusement and relief become indistinguishable.
Plutchik's wheel of emotions
Robert Plutchik's wheel arranges eight primary emotions in opposing pairs: joy vs. sadness, trust vs. disgust, fear vs. anger, surprise vs. anticipation. It adds intensity levels and blends (for example, joy + trust = love). The wheel is widely used in psychology and design. In NLP it appears mostly in lexicon resources and smaller datasets.
GoEmotions: 27 emotions + neutral
Google Research's GoEmotions dataset (Demszky et al., 2020) labeled 58,009 Reddit comments with 27 emotion categories plus neutral. It is one of the largest manually annotated fine-grained emotion datasets and has become the default taxonomy for modern transformer emotion classifiers. Its labels include positive states (admiration, amusement, approval, caring, desire, excitement, gratitude, joy, love, optimism, pride, relief), negative states (anger, annoyance, disappointment, disapproval, disgust, embarrassment, fear, grief, nervousness, remorse, sadness) and ambiguous or cognitive states (confusion, curiosity, realization, surprise). The paper also shows how the 27 labels map back onto Ekman's six groups, so you can roll up to a coarser view when you need one.
See the full list of 28 emotions with definitions and examples for what each label means in practice.
| Taxonomy | Labels | Strength | Limitation |
|---|---|---|---|
| Ekman | 6 | Simple, universal, easy to annotate | Positive emotions collapse into “joy” |
| Plutchik | 8 primary (+ blends) | Opposites and intensity | Few large text datasets |
| GoEmotions | 27 + neutral | Fine-grained, large, multi-label | Rare labels, Reddit/English origin |
Single-label vs. multi-label scoring
Real text rarely carries a single emotion. "Thank you so much, I was really worried this wouldn't arrive in time!" expresses gratitude, relief and some leftover nervousness. How a model handles that depends on its output layer:
- Single-label (softmax): scores across all labels sum to 1, and the model is forced to pick a winner. Mixed emotions show up as split probability, which is hard to interpret. Is 0.4 gratitude plus 0.35 relief two emotions, or an uncertain model?
- Multi-label (sigmoid): each label gets an independent score between 0 and 1. Several labels can be high at the same time, and the scores do not sum to 1. You choose a threshold per label, or just keep the scores.
GoEmotions was annotated as multi-label (raters could select every emotion they saw), so models trained on it naturally use sigmoid outputs. That is what the Sentiment API returns: all 28 scores for every message, sorted from highest to lowest, plus the top emotion.
{
"text": "Thank you so much, I was really worried this wouldn't arrive in time!",
"predictions": [
{ "label": "gratitude", "score": 0.93 },
{ "label": "relief", "score": 0.41 },
{ "label": "nervousness", "score": 0.18 },
...25 more labels
],
"top_emotion": "gratitude",
"top_score": 0.93,
"valence": 0.88
}
// illustrative values — real scores depend on the model and inputWhen you need each
Plain sentiment is usually enough when…
- You need one KPI over time, such as share of negative mentions per week.
- You are ranking or filtering at high volume and only care about the negative tail.
- The text is already about a single topic, such as star-rated reviews of one product.
- The downstream consumer is a chart, not a person deciding what to do.
Emotion detection pays off when…
- You need the "why". In review analysis, disappointment (expectations not met) and anger (felt wronged) point to different fixes.
- You route or prioritise. Support tickets high in anger or fear go to a senior agent. Tickets high in confusion go to documentation or onboarding.
- Positive feedback matters too. Gratitude, admiration and excitement point to different strengths you can lean into in marketing.
- You do research. Social science, UX research and mental-health studies need categories like grief, nervousness or remorse that polarity cannot express.
- You monitor social channels. Amusement and sarcasm often look negative to a lexicon. Separating them reduces false alarms in social media sentiment analysis.
Getting both from one model
You do not have to run two models. Because emotion detection is the richer signal, you can derive polarity from it. Give each emotion a weight between -1 and +1, multiply each score by its weight, sum, and clamp the result:
valence = max(-1.0, min(1.0, sum(score[e] * weight[e] for e in emotions)))The Sentiment API uses this formula with weights such as joy +1.0, gratitude +0.8, annoyance -0.4, anger -0.8 and grief -0.9. Neutral contributes 0. The clamp is needed because multi-label scores do not sum to 1, so several same-sign emotions can push the raw sum past ±1. You get a continuous valence score for dashboards and the full emotion vector for drill-down, from one request. The exact weights for every label are listed on the emotions reference page.
Pitfalls of emotion detection
- Rare labels are noisy. In GoEmotions, labels like grief, pride, relief and nervousness have few training examples, so models are less reliable on them. Treat low scores on rare labels as weak evidence and aggregate before drawing conclusions.
- Annotators disagree. Even humans often disagree on whether a sentence is annoyance or anger, or approval or admiration. Neighbouring labels are best read together, or rolled up into Ekman-style groups.
- Domain shift. A model trained on Reddit comments will read formal support emails or legal text differently. Validate on a few hundred of your own examples before trusting thresholds.
- Expressed vs. felt emotion. Models detect emotion expressed in text, not the writer's actual state. Sarcasm, politeness conventions and quoted speech all get in the way.
- Language coverage. An English-only model will quietly fail on other languages. If your data is multilingual, use a model trained for it. See multilingual sentiment analysis.
If you want to try both views on your own data, the Sentiment API returns all 28 GoEmotions scores and a valence score for Arabic, English, French, Spanish, German and Turkish text. Batches can hold up to 10,000 messages per request, priced per message (see pricing).
Frequently asked questions
Is emotion detection the same as sentiment analysis?
No. Sentiment analysis measures polarity: whether text is positive, negative or neutral, sometimes with an intensity score. Emotion detection identifies which specific emotions are expressed, such as anger, gratitude, fear or confusion. Emotion detection is more granular, and polarity can be derived from it, but not the other way round.
What is an emotion score?
An emotion score is a number from 0 to 1 that says how strongly a model thinks one emotion is present in a text. For example, joy 0.91 means the model is very confident the text expresses joy. A multi-label model gives every emotion its own score, so a single message can score high on both gratitude and relief.
Can I get a sentiment score from an emotion model?
Yes. Assign each emotion a polarity weight (for example joy +1.0, anger -0.8, neutral 0) and combine the emotion scores into a single valence number. The Sentiment API does exactly this and returns a valence score in [-1, 1] alongside all 28 emotion scores.
How many emotions can be detected from text?
It depends on the taxonomy the model was trained on. Ekman-style models detect 6 basic emotions, Plutchik-based models use 8 primary emotions, and models trained on Google's GoEmotions dataset detect 27 emotions plus neutral, for 28 labels in total.
Why do emotion scores not add up to 1?
Multi-label emotion models use an independent sigmoid per label rather than a softmax across labels, because one sentence can express several emotions at once. Each score is a separate probability-like value between 0 and 1, so the scores do not need to sum to 1.
Which is more accurate, sentiment analysis or emotion detection?
Binary sentiment is an easier task, so headline accuracy numbers are usually higher. Fine-grained emotion detection has more classes, rarer labels and more annotator disagreement, so per-label scores are lower. The useful question is whether the extra detail changes your decisions; for diagnosing why customers are unhappy, it usually does.