Lexicons for Sentiment, Affect, and Connotation
Jurafsky & Martin, Speech and Language Processing, 3rd ed. draft, ch. 23
10 cards in “23.5 Supervised learning of word sentiment” · whole deck
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
Source
- Daniel Jurafsky and James H. Martin. Speech and Language Processing. 3rd edition (draft). https://web.stanford.edu/~jurafsky/slp3/