Lexicons for Sentiment, Affect, and Connotation
Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23
60 cards
Introduction
- What does “affective” mean in NLP, following affective computing?Emotion, sentiment, personality, mood and attitudes. Closely related is subjectivity: the study of a speaker’s or writer’s evaluations, opinions, emotions and speculations.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, Introduction, p. 519
- What are the five classes of affective states in Scherer’s typology?
state gist examples emotion brief response to a significant event angry, joyful, proud mood diffuse, low intensity, long, often without cause cheerful, gloomy interpersonal stance stance toward another person in an interaction cold, warm, friendly attitude enduring affectively colored beliefs and preferences liking, hating personality trait stable dispositions typical for a person nervous, reckless - Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, Introduction, p. 519
- In Scherer’s typology, what does sentiment analysis extract?Attitudes: what people like or dislike, e.g. from reviews, editorials or tweets.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, Introduction, p. 519
- Give uses for detecting emotions, moods, interpersonal stance and personality.Emotion/mood: a confused or engaged student in a tutoring system, a frustrated caller, signs of depression. Stance: friendliness or awkwardness, conversational hot spots for meeting summarization. Personality: conversational agents work better when they match users’ personality expectations.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, Introduction, pp. 519–520
- What are affective (sentiment) lexicons, and what do they presuppose?Lists of words carrying strong cues to affect or sentiment, used instead of all words as features. They presuppose that words have connotations: aspects of meaning related to a writer’s or reader’s emotions, sentiment, opinions or evaluations.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, Introduction, p. 520
23.1 Defining emotion
- What are the two families of emotion theories used in computational models?(1) Basic emotions: a small fixed set of atomic units from which others derive (Ekman, Plutchik). (2) Emotion as a point in a 2- or 3-dimensional space (valence, arousal, dominance).
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.1, pp. 520–521
- What are Ekman’s six basic emotions?Surprise, happiness, anger, fear, disgust, sadness, proposed to be universal across cultures.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.1, p. 521
- What is Plutchik’s wheel of emotion?8 basic emotions in four opposing pairs, plus emotions derived from them:
joy ↔ sadness anger ↔ fear trust ↔ disgust anticipation ↔ surprise - Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.1, p. 521
- Define valence, arousal and dominance.Valence: the pleasantness of the stimulus. Arousal: the level of alertness, activeness or energy it provokes. Dominance: the degree of control exerted by the stimulus or the emotion.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.1, p. 521
- How does sentiment relate to the dimensional view of emotion?It is a special case: the valence dimension (how pleasant or unpleasant a word is) is often used directly as a measure of sentiment.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.1, p. 521
- What is appraisal theory, and how does it differ from lexicon-based models?Lexicon models fix a word’s affect regardless of context, dialect or culture. Appraisal theory treats emotions as complex cognitive processes: a person considers how an event fits their goals, given its agency, certainty, urgency, novelty and control.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.1, p. 521
23.2 Available sentiment and affect lexicons
- Name binary positive/negative sentiment lexicons.The General Inquirer (oldest, 1966, from content analysis), the MPQA Subjectivity lexicon (also labels strongly/weakly subjective), and the Hu & Liu (2004) polarity lexicon (from product reviews, bootstrapped from WordNet).
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.2, p. 522
- What is the NRC VAD lexicon?Scores for valence, arousal and dominance for about 20,000 words (Mohammad 2018), e.g. high valence vacation, low torture; high arousal enraged, low napping; high dominance powerful, low weak.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.2, p. 522
- What is EmoLex?The NRC Word-Emotion Association Lexicon: binary associations of about 14,000 words with Plutchik’s 8 emotions plus positive/negative, e.g. reward: anticipation, joy, surprise, trust, positive.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.2, p. 522
- What does the NRC Emotion/Affect Intensity Lexicon add?Real-valued association scores (rather than binary) for anger, fear, joy and sadness, e.g. outraged is very high on anger, nurture very low.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.2, p. 523
- What is LIWC?Linguistic Inquiry and Word Count: 73 hand-built lexicons for social-psychological tasks, with categories like positive and negative emotion, anger, sadness, insight, inhibition, family, negation. Entries may be prefixes (
appreciat*).- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.2, p. 523
- What other hand-built affective lexicons exist besides sentiment?The General Inquirer’s dimensions (strong/weak, active/passive, overstated/understated; pleasure, pain, virtue, vice…) and concreteness ratings (Brysbaert et al.): crowdsourced 1–5 ratings, e.g. banana 5, belief about 1.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.2, p. 523
23.3 Creating affect lexicons by human labeling
- How is affect lexicon creation by human labeling usually done today?By crowdsourcing: break the task into small pieces and distribute them to many annotators.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.3, pp. 523–524
- How did EmoLex make sure annotators judged the right word sense?Each item first asked a multiple-choice synonym question that primed the intended sense (e.g. which word is closest to startle: automobile, shake, honesty, entertain?), then asked for association with each of the 8 emotions.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.3, p. 524
- How were EmoLex’s graded ratings turned into labels?Ratings on a not/weakly/moderately/strongly scale were filtered for outliers, the majority class taken (ties to the stronger), then mapped to binary: not/weak → 0, moderate/strong → 1.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.3, p. 524
- What is best–worst scaling?Annotators get N items (usually 4) and choose the best (highest) and worst (lowest) on some property. A word’s score is the proportion of times chosen best minus the proportion chosen worst. Used for the NRC VAD lexicon.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.3, p. 524
- What is split-half reliability?A measure of annotation agreement: split the annotations in half and correlate the scores computed from the two halves.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.3, p. 525
23.4 Semi-supervised induction of affect lexicons
- What is the basic idea of semi-supervised lexicon induction?Start from seed words defining two poles of a semantic axis (good vs bad) and label each word by its similarity to the two seed sets; two families are axis-based and graph-based.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.4, p. 525
- How can seed sets handle domain differences in affect?Either start with one large seed lexicon and let induction adapt it to the domain, or choose different seeds per genre (e.g. separate seeds for general text, Twitter and finance, where profit, gains vs litigation, losses matter).
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.4, p. 525
- Describe the semantic axis method for building a sentiment lexicon.Embed the seed words (off-the-shelf, trained on the domain, or fine-tuned); take each pole’s centroid \(V^+\), \(V^-\); the axis is \(V_{axis} = V^+ - V^-\); score each word by \(\cos(E(w), V_{axis})\).
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.4, pp. 525–526
- How can a semantic axis score be turned into discrete lexicons?Apply a threshold (or similar method) to split the scored words into positive and negative lists.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.4, p. 526
- Describe the SentProp label propagation algorithm.(1) Build a graph connecting each word to its k nearest embedding neighbors, edges weighted by cosine-based similarity. (2) Pick positive and negative seeds. (3) Run random walks from each seed set; a word’s raw score is the probability of landing on it. (4) Combine: \(score^+(w) = \frac{raw^+(w)}{raw^+(w) + raw^-(w)}\). (5) Bootstrap over seed subsets for confidence.
Seeds (solid) pass polarity to neighbors through random walks; a word between both sides stays neutral - Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.4, pp. 526–527
- How does Hatzivassiloglou and McKeown’s algorithm decide that two adjectives share polarity?Syntactic cues: adjectives frequently conjoined by and tend to share polarity (fair and legitimate, corrupt and brutal); those conjoined by but tend to be opposite (fair but brutal).
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.4, p. 527
- What morphological cue signals opposite polarity?Morphological negation: adjectives with the same root differing by un-, im-, -less (adequate/inadequate, thoughtful/thoughtless) tend to have opposite polarity.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.4, p. 528
- How can WordNet expand a seed sentiment lexicon?Iteratively: Lex⁺ gets synonyms of positive words and antonyms of negative words; Lex⁻ gets synonyms of negative words and antonyms of positive words.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.4, p. 528
- What is SentiWordNet?Polarity assigned to WordNet synsets rather than words: each sense gets positive, negative and objective scores (summing to 1), e.g. estimable “deserving of esteem” is positive, “may be computed” purely objective. A classifier on glosses plus a random walk assigns the scores.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.4, p. 528
- Summarize the similarity metrics used by semi-supervised lexicon induction.Embedding cosine, coordination (and/but), morphology, and thesaurus structure, scoring words by similarity to positive seeds and dissimilarity to negative ones.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.4, p. 528
23.5 Supervised learning of word sentiment
- What natural supervision signal exists for word sentiment?Online review scores (stars): positive words appear more in 5-star reviews, negative in 1-star ones. A word can be represented by its distribution over rating levels, not just a binary polarity.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.5, pp. 528–529
- What is the Potts score (normalized likelihood)?\(P(w \mid c) = \frac{count(w, c)}{\sum_{w \in C} count(w, c)}\), \(PottsScore(w) = \frac{P(w \mid c)}{\sum_c P(w \mid c)}\): the word’s likelihood in each rating category, normalized over categories. It is a variant of PMI without the log.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.5, p. 529
- What shapes do Potts diagrams of scalar adjectives show?Strongly positive words (excellent): J-shape. Strongly negative (terrible): reverse J. Weakly polarized words: a hump, peaking below the middle (disappointing) or above it (good).
Schematic shapes (not data): J, reverse J, hump; x = star rating - Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.5, p. 530
- What do Potts diagrams show for emphatic and attenuating adverbs?Emphatics (totally, absolutely) have a J-shape or a U-shape (frequent in both extremes); attenuators (somewhat, fairly, pretty) have a hump, favoring the middle of the scale.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.5, p. 530
- What is the problem with simple log likelihood ratio or log odds ratio for finding words characteristic of one corpus?They overemphasize differences in very rare words (tiny counts fluctuate, or are zero in one corpus) and often in very frequent words.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.5, pp. 530–531
- Define the log likelihood ratio of a word between corpora \(i\) and \(j\).\(llr(w) = \log\frac{P^i(w)}{P^j(w)} = \log\frac{f^i(w)}{n^i} - \log\frac{f^j(w)}{n^j}\), with \(f\) the word count and \(n\) the corpus size.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.5, p. 531
- Define the log odds ratio of a word between two corpora.\(lor(w) = \log\frac{f^i(w)}{n^i - f^i(w)} - \log\frac{f^j(w)}{n^j - f^j(w)}\): compares the word’s odds rather than its probabilities.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.5, p. 532
- What is the “log odds ratio informative Dirichlet prior” method (Monroe et al. 2008)?It adds scaled counts from a large background corpus as a prior (\(\alpha_w\), \(\alpha_0\)): \(\delta_w^{(i-j)} = \log\frac{f^i_w + \alpha_w}{n^i + \alpha_0 - (f^i_w + \alpha_w)} - \log\frac{f^j_w + \alpha_w}{n^j + \alpha_0 - (f^j_w + \alpha_w)}\), then divides by its estimated standard deviation, \(\sigma^2 \approx \frac{1}{f^i_w + \alpha_w} + \frac{1}{f^j_w + \alpha_w}\), giving a z-score.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.5, p. 532
- What two modifications does Monroe et al.’s method make to the plain log odds ratio?It uses background-corpus counts as a prior (shrinking toward expected frequencies) and z-scores that control for the variance in a word’s frequency.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.5, p. 532
- Beyond sentiment words, how do 1-star and 5-star restaurant reviews differ (Jurafsky et al. 2014)?
1-star 5-star negation: no, not emphatics, universals: very, always, every 1st plural we, us; 3rd person 2nd person you past narrative: asked, told, waited advice: try, recommend people: manager, waiter dessert, atmosphere, wine - Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.5, pp. 532–533
23.6 Using lexicons for sentiment recognition
- When are lexicons useful for sentiment classification, and what is the simplest rule-based method?When there is not enough labeled training data. Count (optionally weighted) positive and negative lexicon words, \(f^+\) and \(f^-\): classify positive if \(f^+/f^- > \lambda\), negative if \(f^-/f^+ > \lambda\), otherwise neutral.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.6, p. 533
- How are lexicons used when supervised training data is available?Lexicon counts (weighted or normalized) become features in a classifier alongside other lexical and non-lexical features.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.6, p. 533
23.7 Using lexicons for affect recognition
- What is the standard approach to detecting emotion and other affective states in text?Supervised classification: with large, similar training and test sets, all words or bigrams as features to logistic regression or an SVM is hard to beat; affect detection is treated as document classification.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.7, p. 534
- How did Schwartz et al. select n-gram features from a huge corpus of social media posts?Keep only words and phrases used by at least 1% of subjects, and keep 2- and 3-grams only with high PMI, \(\log\frac{p(phrase)}{\prod_{w \in phrase} p(w)} > 2 \cdot length\); counts were normalized by each subject’s total word use.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.7, p. 534
- What values can a lexicon feature take?An indicator (1 if the text has any word from lexicon \(L\)), the count of tokens in \(L\), \(\sum_{w \in L} count(w)\), or a weighted count \(\sum_{w \in L} \theta^L_w count(w)\); counts may be logged or normalized per writer.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.7, p. 534
- After training a lexicon-feature classifier, how do you see which lexicons matter?Inspect the feature weights, e.g. in logistic regression the weight indicates how associated the lexicon feature is with each class.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.7, p. 535
23.8 Lexicon-based methods for entity-centric affect
- How does the entity-centric affect method of Field and Tsvetkov (2019) work?Training: for each word, average its contextual embeddings (e.g. BERT, no fine-tuning) and fit three regression models predicting its NRC VAD scores. Inference: embed an entity mention in context, apply the regressors, and average over coreferent mentions.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.8, p. 535
- What do Valence, Arousal and Dominance become when applied to people in entity-centric affect?Sentiment, Agency and Power.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.8, p. 535
- What does entity-centric affect show for characters in a film plot summary?Archetypes: protagonist and antagonist both have high power and agency but differ in sentiment; a love interest may have low power and agency but high sentiment.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.8, pp. 535–536
23.9 Connotation frames
- What is a connotation frame?A lexicon combining affect with frame semantics: a predicate expresses connotations about its arguments, e.g. sentiment of writer and reader toward each role, and of roles toward each other.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.9, p. 535
- Contrast the connotation frames of violate and survive.
Role1 (subject) Role2 (object) Country A violated the sovereignty of Country B antagonist: writer − victim: writer + the teenager survived the bombing sympathetic victim: writer + hardship: writer − - Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.9, p. 536
- Besides sentiment, what other aspects can connotation frames express?Effect (something bad happened to x), value (x is valuable), mental state (x is distressed), power differential between arguments, and agency of the agent.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.9, p. 536
- What do connotation frames say about implore, demand and wait?He implored the tribunal: agent has less power than the theme (power(AG<TH)); demanded implies the reverse. The princess waited for her prince: low agency for the agent (agency(AG)=−).
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.9, p. 537
- How are connotation frames built?By hand (crowdsourced, as in Sap et al.) or learned by supervised classifiers for each relation (e.g. whether S(writer→Role1) is + or −), with global constraints across relations.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, §23.9, pp. 536–537
Historical notes
- What was the origin of formally representing subjective word meaning?Osgood et al. (1957): participants rated words on scales, and factor analysis found the most significant factor was the evaluative dimension (good/bad, valuable/worthless, pleasant/unpleasant). This influenced content-analysis dictionaries like the General Inquirer.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, Historical notes, p. 538
- Who introduced the term “sentiment” in this sense, and for what task?Das and Chen (2001), measuring market sentiment from stock message board words, with a hand-made lexicon weighted by how well words discriminate classes like buy vs sell.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, Historical notes, p. 538
- What did Pang et al. (2002) show?The power of using all the words as features for sentiment classification, without a sentiment lexicon.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, Historical notes, p. 538
- What is DENSIFIER?An algorithm (Rothe et al. 2016) that learns to transform an embedding space so that sentiment (or another property) is concentrated in a few dimensions.
- Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23, Historical notes, p. 538
Source
- Daniel Jurafsky and James H. Martin. Speech and Language Processing. 3rd edition (draft). https://web.stanford.edu/~jurafsky/slp3/