- Introduced by
- Paul Ekman (basic-emotions theory)
- Year
- 1992
- Type
- NLP text-classification task
What does it do?
Emotion detection is a natural-language-processing task that assigns each text one emotion label from a predefined scheme, such as Ekman's basic emotions (fear, joy, anger, sadness, surprise, disgust) or Plutchik's wheel of emotions.
Unlike positive/negative sentiment analysis, it asks which emotion a text carries. The basic-emotions view is often linked to Paul Ekman's 1992 paper, An Argument for Basic Emotions, but that paper argues for characteristics that emotions share and does not itself list the six categories used in practice.
The intuition behind the method
A sentence can be negative because the writer is angry or because they are sad, and those are different signals. Emotion detection asks which emotion a text carries, not only whether it is positive or negative. Instead of judging tone by intuition, the method maps wording onto a fixed emotion scheme, either through a word–emotion lexicon that associates words with feelings or through a model trained on emotion-labelled text, and assigns each document one category from that scheme.
History
The basic-emotions view is usually traced to Paul Ekman, whose 1992 paper argues that emotions share characteristics such as rapid onset, short duration and automatic appraisal, and differ from other affective phenomena. That paper does not itself enumerate the six categories, so the six-category set common in emotion detection is best treated as a convention of practice rather than a result of that paper. Mohammad and Turney crowdsourced the NRC Word–Emotion Association Lexicon, a large word–emotion resource that lexicon-based emotion detection can draw on.
When to use it
Choose emotion detection when your question requires knowing which emotion appears in the text, for example distinguishing anger from sadness within negative text, rather than only its polarity. It needs a fixed emotion labelling scheme and either emotion-labelled training data or an emotion lexicon matching the language and domain of your corpus. Do not use it if polarity alone answers your question, since sentiment analysis is the simpler choice, or if no emotion resource exists for your language.
Limitations and considerations
- Requires a predefined emotion scheme and either emotion-labelled data or an emotion lexicon before it can run.
- Lexicon associations reflect how annotators were asked. The cited word–emotion lexicon work reports that asking whether a term is associated with an emotion gave markedly higher interannotator agreement than asking whether it evokes one, so the wording of the annotation question shapes what the lexicon records.
- Results depend on the lexicon or model matching the language and domain of the text.
- Emotion is more nuanced than polarity, and overlapping or mixed emotions in one passage are hard to separate into a single label.
- Lexicon-based scoring works at word level, so it generally does not capture negation, sarcasm, or how a word is used in context; the cited lexicon work extends annotation to sense level rather than word level.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Identifies specific emotions such as anger, joy, fear, or sadness rather than only positive or negative polarity.
- Labels are tied to named frameworks (Ekman's basic emotions, Plutchik's wheel), so categories can be defined and compared against a documented scheme.
- Lexicon-based variants do not require a trained model, which is useful when no emotion-labelled training set is available.
Applications
- Detecting specific emotions in social-media posts and customer feedback beyond simple sentiment.
- Analysing emotional tone in support conversations and dialogue.
- Studying emotional content in survey responses and open-ended text in social and health research.
- Exploring emotion patterns across large text corpora.
How it works
How it works
An emotion labelling scheme is chosen first. This is usually Ekman's set of basic emotions (fear, joy, anger, sadness, surprise, disgust) or Plutchik's wheel of emotions. The scheme defines exactly which categories the method can output and must be fixed before any labelling begins. The examples on this page use Ekman's six categories.
The text is cleaned and prepared for analysis, and the resources that carry the emotion signal are made ready — either an emotion-annotated training set or a word–emotion association lexicon such as NRC. Consistent preparation keeps documents comparable so the same word maps to the same emotion signal across the corpus.
Each document is assigned an emotion from the chosen scheme. A lexicon-based approach looks up emotion-associated words and aggregates their contributions across the document; a learned approach applies a classifier trained on emotion-labelled text. The output is one emotion label per document.
Predicted emotions are scored against labelled data and misclassifications are inspected. Because emotion classes are often imbalanced, performance is read per class rather than from overall accuracy alone, since overall accuracy can look high for a model that does well only on the most frequent emotion. For each emotion, precision is the share of documents predicted as that emotion that truly carry it, recall is the share of documents that truly carry it that were found, and F1 is their harmonic mean. Macro-averaged F1, the unweighted mean of the per-class F1 scores, gives rare emotions the same weight as frequent ones. A confusion matrix shows which emotions are mistaken for which.
Common pitfalls
- Skipping the scheme decision: without a fixed emotion taxonomy the output labels are inconsistent and hard to evaluate.
- Applying a lexicon or model built for one language or domain to another, which degrades accuracy.
- Treating word-level lexicon entries as fixed emotions. The cited lexicon work notes that annotation was extended to sense level, which suggests a word's emotion can depend on how it is used.
- Reading overall accuracy on imbalanced emotion classes; inspect per-class performance instead.
- Forcing mixed or ambiguous passages into one clean label without inspecting the borderline cases.
- Accepting lexicon or model output as a validated emotion measure without checking it against labelled examples from your own corpus.
Frequently asked questions
How is emotion detection different from sentiment analysis?
Sentiment analysis classifies text on a polarity axis — typically positive, negative, or neutral. Emotion detection assigns a specific emotion category such as fear, joy, anger, sadness, surprise, or disgust, which is a finer-grained signal than overall polarity.
Which emotion scheme should I use?
The two frameworks named here are Ekman's set of basic emotions and Plutchik's wheel of emotions. Choose one and fix it before labelling; the scheme defines exactly which categories the method can output. The examples on this page use Ekman's six categories.
Do I need labelled data, or is a lexicon enough?
Either can drive emotion detection. A word–emotion lexicon such as NRC associates words with emotions and works without a trained model, while a learned classifier needs emotion-labelled text. The choice depends on what resources you have for your language and domain.
Can it run in languages other than English?
Yes, but the lexicon or model must match the language of the corpus. Applying an English-only emotion resource to text in another language is a common cause of poor results.
Related methods
Sources
Ekman, P. (1992). An Argument for Basic Emotions. Cognition & Emotion, 6(3-4), 169-200.
Open DOI referenceMohammad, S.M. & Turney, P.D. (2013). Crowdsourcing a Word–Emotion Association Lexicon. Computational Intelligence, 29(3), 436-465.
Open DOI reference