Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition...

18
Recognizing Emotions in Text Saima Aman Masters Thesis Presentation Supervisor: Dr. S. Szpakowicz University of Ottawa 2007

Transcript of Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition...

Page 1: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Recognizing Emotions in Text

Saima Aman Master’s Thesis Presentation

Supervisor: Dr. S. Szpakowicz

University of Ottawa 2007

Page 2: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Introduction | Data | Experiments | Conclusion

Agenda

Introduction §  Problem Definition §  Related Work

Data §  Emotion Annotation §  Annotation Agreement Measurement

Experiments §  Emotion/Non-emotion Classification §  Fine-grained Emotion Classification §  Emotion Intensity Recognition

Conclusions

Page 3: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Problem Definition

Objective §  Determine emotions expressed in text at the sentence level

Recognize Emotion Class §  happiness, sadness, anger, disgust, surprise, fear (Ekman, 1992)

§  mixed emotion, no emotion

Determine Emotion Intensity §  high, medium, low, neutral

Data §  Drawn from blogs §  Manually annotated with emotion labels

Introduction | Data | Experiments | Conclusion

Page 4: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Application Areas

Affective Interfaces §  make sense of emotional input §  provide emotional responses §  human-computer interaction (HCI) §  computer-mediated communication (CMC) §  e-learning systems

Text-to-Speech (TTS) Systems §  natural emotional rendering of text

Psychological Analysis of Text §  learn user preferences, inclinations, and biases §  personality modeling §  consumer review analysis

Introduction | Data | Experiments | Conclusion

Page 5: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Related Work

Sentiment Analysis §  finding subjectivity, opinion, appraisal, orientation, affect, emotions §  finding polarity – positive/negative sentiment §  finding intensity – high, low, neutral

Genres §  news articles, editorials, opinion pieces (edited, professional) §  movie reviews, product reviews, blogs (unedited,informal)

Sentiment Analysis Methods §  Machine Learning methods §  Unsupervised methods

Introduction | Data | Experiments | Conclusion

Page 6: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Related Work

Knowledge Sources For identifying semantic orientation of words/phrases

§  Specialized lexicons (e.g., GI, WN-Affect, SentiWordNet)

§  Lexicons built using - domain-specific words/phrases (e.g., “great acting”) - syntactic patterns (e.g., adverb-adj as in “very happy”) - existing general-purpose lexicons (e.g., WordNet, Roget’s)

§  Corpus-driven approaches - PMI-IR (based on co-occurrence with similar words) - probabilistic sentiment scores (based on relative frequency

in labeled documents)

§  Contextual valence shifters - intensifiers, diminishers, negations

Introduction | Data | Experiments | Conclusion

Page 7: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Data

Data Collection §  Used seed words for each emotion category §  173 blog posts collected (5205 sentences)

Annotation Process §  four judges involved in the annotation process §  each sentence subjected to two decisions Types of Annotations §  Emotion Category – {hp, sd, ag, dg, sp, fr, me, ne} §  Emotion Intensity – {h, m, l} §  Emotion Indicators (individual words / strings of words)

Example But all of a sudden it’s hit me that I have all this work due. (sp, h)

Introduction | Data | Experiments | Conclusion

Page 8: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Annotation Agreement Measurement

Emotion Category §  Cohen’s kappa used for agreement measurement (Cohen, 1960)

Introduction | Data | Experiments | Conclusion

Pairwise agreement in emotion categories

0.77

0.68 0.66 0.67

0.6

0.79

0.43

0.76

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

hp sd ag dg sp fr me em/neEmotion Category

Aver

age k

appa

Page 9: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Annotation Agreement Measurement

Emotion Intensity §  Cohen’s kappa used for agreement measurement (Cohen, 1960)

Introduction | Data | Experiments | Conclusion

Pairwise agreement in emotion intensity

0.72

0.37

0.46

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

High Medium Low

Emotion Intensity

Aver

age K

appa

Page 10: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Annotation Agreement Measurement

Emotion Indicators §  MASI (Passonneau, 2006)

A/B = set of emotion indicators identified by Judge1/Judge2 MASI = J * M

J = |A∩B| / |A∪B|

§  I/O Method each word labeled (In) or (Outside) an emotion indicator Example – “I/O am/O very/I happy/I” (kappa can be used)

§  Avg. MASI = 0.61 ; Avg. kappa = 0.66

Introduction | Data | Experiments | Conclusion

⎪⎪⎩

⎪⎪⎨

=∩

≠−≠−≠∩

⊂⊂

=

=

φφφφ

BAifABandBABAif

ABorBAifBAif

M

,0,,,3/1

,3/2,1

Page 11: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Experiments – Emotion/Non Emotion Classification

Used ML methods – SVM and Naïve Bayes Features §  GI – Emotion, Positive, Negative, Interjection Pleasure, Pain words §  WN-Affect – Happiness, Sadness, Anger, Disgust, Surprise, Fear words §  Special symbols – Emoticons, Punctuations (“?” and “!”)

Introduction | Data | Experiments | Conclusion

Emotion/non-emotion classification results

71.33%70.58%

73.89% 73.89%

68.00%

69.00%

70.00%

71.00%

72.00%

73.00%

74.00%

75.00%

GI WNA GI+WNA ALL

Features

Accu

racy

Naïve Bayes

SVM

Page 12: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Experiments – Fine-grained Emotion Classification

Baseline Term counting method using emotion words from WordNet-Affect Features §  Corpus-based unigram features (excluding low-freq words and stopwords) §  Features from emotion lexicons -

§  WordNet-Affect (existing emotion lists) §  emotion lexicon automatically built from Roget’s Thesaurus

Lexicon from Roget’s Thesaurus §  Words in Rogets’ classification hierarchy considered as nodes in a network §  Related words likely to be located close to each other in the network §  They can be found using Semantic Similarity Measure (Jarmasz and Szpakowicz, 2004) §  Emotion words for each emotion category acquired by selecting words similar

to {happy, sad, anger, disgust, surprise, fear}

Introduction | Data | Experiments | Conclusion

Page 13: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Experiments – Fine-grained Emotion Classification

Fine-grained emotion classification results

0.751

0.4930.522

0.5660.522

0.6450.605

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

hp sd ag dg sp fr ne

Emotion Category

F-M

easu

re

.

Baseline

Unigrams

Unigrams+RT

Unigrams+RT+WNA

Introduction | Data | Experiments | Conclusion

Page 14: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Experiments – Emotion Intensity Recognition

Emotion Intensity Modifications §  relatively weak and strong words (e.g., “dislike” and “abhor”) §  intensifiers (e.g., “very happy”, “highly grateful”, “much disappointed”) §  diminishers (e.g., “little embarrassed”, somewhat apprehensive”, “not pathetic”) §  comparative and superlative forms of adjectives (“happier”, “greatest”)

Syntactic Bigrams §  Represent English language constructs used to express and modify emotion §  Identified using the Link Parser §  Pairs of words connected by links output by the parser §  Link examples:

§  EA connects adverbs to adjectives (e.g., <more, happy>) §  EE connects adverbes to other adverbs (e.g., <so, angrily>) §  Other adjective and adverb related links (e.g., <awful, lot>, <much, more>) §  Idiomatic expressions (e.g., <very, very>), etc.

Introduction | Data | Experiments | Conclusion

Page 15: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Experiments – Emotion Intensity Recognition

Features §  Corpus-based unigram features (excluding low-freq words and stopwords) §  Syntactic bigrams

Introduction | Data | Experiments | Conclusion

Emotion intensity classification results

0.493

0.301

0.164

0.507

0

0.1

0.2

0.3

0.4

0.5

0.6

High Medium Low Neutral

Emotion Intensity

F-Me

asur

e

.

Unigrams

Unigrams+Syntactic Bigrams

Page 16: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Conclusions

Summary §  Studied emotion expressions in text during manual annotation §  Investigated computational methods to identify the type and strength of the

expressed emotion

Results §  Use of external knowledge resources helpful in determining emotion-related words §  Use of syntactic features along with the corpus-based unigram features helpful in

recognizing emotion intensity

Contributions §  Prepared an emotion-labeled corpus §  Demonstrated the feasibility of applying computational methods for automatic

emotion recognition §  Introduced a novel approach of automatically building Emotion Lexicon using

Roget’s thesaurus

Introduction | Data | Experiments | Conclusion

Page 17: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

References

[1] Cohen, J. (1960). A coefficient of agreement for nominal scales. Educational and Psychological Measurement, 20 (1): 37–46.

[2] Ekman, P. (1992). An Argument for Basic Emotions. Cognition and Emotion, 6, 169-200. [3] Jarmasz, M. and Szpakowicz, S. (2004). Roget's Thesaurus and Semantic Similarity. In

N. Nicolov, K. Bontcheva, G. Angelova, R. Mitkov (eds.) Recent Advances in Natural Language Processing III: Selected Papers from RANLP 2003, John Benjamins, Amsterdam/Philadelphia, Current Issues in Linguistic Theory, 260, pages 111-120.

[4] Passonneau, R. (2006). Measuring agreement on set-valued items (MASI) for semantic and pragmatic annotation. In Proceedings of LREC-2006, Genoa, Italy.

Resources [1] Jarmasz, M. and Szpakowicz, S. (2001). The Design and Implementation of an

Electronic Lexical Knowledge Base. In Proceeding of the 14th Biennial Conf. of the Canadian Society for Comp.Studies of Intelligence (AI-2001), Ottawa, Canada, 325-333.

[2] Stone, P.J., Dunphy, D.C., Smith, M.S., Ogilvie, D.M., and associates. (1966). The General Inquirer: A Computer Approach to Content Analysis. The MIT Press.

[3] Strapparava, C. and Valitutti, A. (2004). WordNet-Affect: an affective extension of WordNet. In Proceedings of LREC2004, 1083 – 1086, Lisbon, Portugal.

Introduction | Data | Experiments | Conclusion

Page 18: Recognizing Emotions in Textsaimacs.github.io/pubs/2007-MS-Thesis-slides.pdf · Problem Definition Objective ! Determine emotions expressed in text at the sentence level Recognize

Thank you!