/ 59
Sentiment Analysis & Computational Argumentation
CMU 11-411/611 Natural Language Processing November 7, 2019 Yohan Jo
1
Sentiment Analysis & Computational Argumentation CMU 11-411/611 - - PowerPoint PPT Presentation
Lecture 21 Sentiment Analysis & Computational Argumentation CMU 11-411/611 Natural Language Processing November 7, 2019 Yohan Jo 1 / 59 fact or opinion? positive/negative attitude? argument? everyone should go vegan because vegan
/ 59
1
/ 59 2
/ 59
▶ What attitude/opinion? — Sentiment Analysis ▶ Why that attitude/opinion? — Argumentation
3
/ 59
4
/ 59 5
1 2
1 2 DJIA z-score Calm z-score bank bail-out
/ 59
▶ Lexicon Approach ▶ Machine Learning Approach
6
/ 59
▶
▶
7
/ 59
joyful, fearful, ashamed, proud)
cause (cheerful, gloomy, irritable, depressed)
the interpersonal exchange of that situation (polite, distant, cold, warm, supportive)
value, desire)
(nervous, anxious, reckless, morose, hostile, envious, jealous)
8
/ 59
▶
▶
9
/ 59
10
Holder: speaker Target: their new ice cream Type: negative Claim: their new ice cream is awful Holder: Chris Target: their new ice cream Type: positive Claim: Chris loves it
/ 59
11
/ 59 12
/ 59
▶
Positive (1,915), negative (2,291), hostile, strong, weak, active, passive, arousal, ...
▶
Positive (408), negative (498), affective (917), social (456), causal (108), certainty (83), ...
▶
Positive (2,718), negative (4,912), neutral
▶
Strongly subjective and weakly subjective
▶
WordNet synsets automatically annotated for positivity, negativity, and neutrality
13
/ 59
14
/ 59
15
/ 59
16
▶
/ 59
17
/ 59
▶
▶
18
/ 59
▶
▶
19
good risky fine sound selfish harmful
/ 59 20
1 2
1 2 DJIA z-score Calm z-score bank bail-out
(72 terms for six mood types)
(964 terms for six mood types)
Weighted Sum of Mood Scores
Score(tweet, Tension) = (Average the Tension scores of tweets)
∑
(w,s)∈Tension
s × 1(tweet has w)
/ 59
21
/ 59
22
(6) The criteria set by Rice are the following: the three countries in question are repressive (nega- tive) and grave human rights violators (negative) . . .
(Wilson et al., 2005)
@MargaretsBelly Amy Schumer is the stereotypical 1st world Laci Green feminazi. Plus she's unfunny
(Rosenthal et al., 2017)
/ 59
23
/ 59
24
▶
▶
/ 59
25
▶
Two-step binary classification (neutral vs. non-neutral and positive vs. negative)
▶
One-versus-rest
neutral vs. other)
▶
One-step
/ 59
26
▶
Balanced: Accuracy =
▶
Skewed (e.g., to negative):
, Recall= , F1-score=
▶
Balanced: Accuracy =
▶
Skewed: AverageRecall=
NPP + NNN NPP + NPN + NNP + NNN NPP NPP + NNP NPP NPP + NPN 2Precision*Recall
Precision + Recall
NPP + NUU + NNN ∑ N* 1 3 ( NPP NPP + NPU + NPN + NUU NUP + NUU + NUN + NNN NNP + NNU + NNN)
True\Pred Pos Neg Pos Neg
True\Pred Pos Neu Neg Pos Neu Neg
/ 59
27
▶
Mean Absolute Error: MAE= , where and are the true and predicted scores of the th instance, respectively
N
i=1
/ 59
28
are repressive and grave human rights violators.
word by a conjunct
/ 59
29
preceding the current word, but the negation word is not used as an intensifier (e.g., not only)
four words preceding the current word?
within the four words preceding the current word?
within the four words preceding the current word?
are repressive and grave human rights violators.
/ 59
30
3
c=1
y, ̂ y∈D
/ 59
31
w2
w3
w4
w5
w1
h1 RNN h2 RNN h3 RNN h4 RNN h5 RNN h0 = (0, ..., 0)
RNN Cell
/ 59
32
–
This film
– – –
does n’t
+
care
+
about
+ + + + +
cleverness , wit
+
any
+
kind
+
+ +
intelligent
+ +
humor .
RNN RNN RNN RNN RNN RNN RNN RNN RNN RNN RNN RNN RNN RNN RNN RNN
/ 59
33
–
This film
– – –
does n’t
+
care
+
about
+ + + + +
cleverness , wit
+
any
+
kind
+
+ +
intelligent
+ +
humor .
/ 59
34
/ 59 35
/ 59 36
/ 59
37
/ 59
▶
▶
▶
38
/ 59
an idea that can be true or false (Wikipedia). Sometimes a proposition is just called a
▶
✔ snow is white / snow is green
▶
✘ ouch!
▶
✘ where are we?
▶
✘ open the door!
39
many CMU students go to Chipotle I have at least five CMU friends who go to Chipotle every day
Chipotle makes a lot of money
premise conclusion premise conclusion
/ 59
40
/ 59
41
Harry was born in Bermuda
Harry is a British subject
a man born in Bermuda will generally be a British subject legal statuses of A, B, C and legal provisions X, Y, Z both his parents were aliens
unless because
presumably
/ 59
42
Conclusion: A is true Premise: A generally causes B, and B is observed Conclusion: A is true Premise: An example case B is true Conclusion: A should be carried out Premise: A will yield a positive consequence B
/ 59
43
/ 59
44
/ 59
45
if Rubio is a nominee, Clinton cannot lecture Rubio about living paycheck to paycheck Rubio was raised paycheck to paycheck
Marco Rubio
/ 59
▶
▶
46
/ 59
47
p(y|x) = 1 Z(x)
T
∏
t=1
exp {
K
∑
k=1
wk fk(yt, yt−1, x)}
/ 59
▶ ▶ ▶ ▶
...
f1(yt, yt−1) = { 1
if yt−1 = O ∧ yt = B
f2(yt, yt−1) = { 1
if yt−1 = O ∧ yt = I
f3(yt, yt−1) = { 1
if yt−1 = O ∧ yt = O
48
▶ ▶ ▶ ▶
...
f1(x) = { 1
if xt−1 ∈ {. ? !}
f2(x) = { 1
if xt is capitalized
f3(x) = { 1
if POS_TAG(xt) = VB
/ 59
49
/ 59
50
/ 59
▶
Overlap: Whether the conclusion and the premise share a noun.
▶
Indicator features: Different classes of discourse markers
▶
Syntactic features: Binary POS features of the conclusion and premise. 500 most frequent production rules extracted from the parse tree of the conclusion and premise (e.g., VP → VB NN)
▶
Structural features: # of tokens in the conclusion and premise.
▶
Discourse features: Has a PDTB-style discourse relation (e.g., causal, contrast)?
51
/ 59
52
word embeddings, synonym-based approaches, etc.
/ 59
53
/ 59 54
/ 59
55
Prompt: Should physical education be mandatory in schools?
/ 59
▶
Unigrams/bigrams
▶
Formality/contextuality: distribution of POS tags
▶
Ratio of exclamation/quotation marks
▶
Ratio of modal verbs
▶
Readability: Ari, Coleman-Liau, Flesch, ..
▶
Spelling errors
▶
Counts of named entity types
▶
Sentiment scores
▶
Sentence length Accuracy = 0.78 (SVM)
56
/ 59
57
This House would ban teachers from interacting with students via social networking websites.
/ 59
▶
▶
▶
▶
▶
▶
▶
▶
58
Criteria
/ 59
59
▶ What is an argument? ▶ Argument Structures ▶ Argument Mining ▶ Argument Quality
▶ What is sentiment analysis? ▶ Sentiment Analysis