Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

41
MARINA SANTINI PROGRAM: COMPUTATIONAL LINGUISTICS AND LANGUAGE TECHNOLOGY DEPT OF LINGUISTICS AND PHILOLOGY UPPSALA UNIVERSITY, SWEDEN 21 NOV 2013 Semantic Analysis in Language Technology Lecture 3 - Semantic-Oriented Applications: Sentiment Analysis Course Website : http://stp.lingfil.uu.se/~santinim/sais/sais_fall2013.htm

description

Objective of sentiment analysis: Given an opinion document d, discover all opinion quintuples (ei, aij, sijkl, hk, tl) in d. With these quintuples, unstructured data --> structured data (Bing Liu, Sentiment Analysis and Opinion Mining. 2012)

Transcript of Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Page 1: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

MARINA SANTINI

P R O G R A M : C O M P U TAT I O N A L L I N G U I S T I C S A N D L A N G U A G E T E C H N O L O G Y

D E P T O F L I N G U I S T I C S A N D P H I L O L O G Y

UPPSALA UNIVERSITY, SWEDEN

21 NOV 2013

Semantic Analysis in Language Technology

Lecture 3 - Semantic-Oriented Applications:Sentiment Analysis

Course Website: http://stp.lingfil.uu.se/~santinim/sais/sais_fall2013.htm

Page 2: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

2

Acknowledgements

Thanks to Bing Liu for the many slides I borrowed from his Tutorial on Sentiment Analysis and Opinion Mining. Big thanks to Dan Jurafsky for his slides from Coursera NLP course.

Page 3: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

3

Page 4: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

4

Why are sentiments important (opinions/emotions/affects/attitudes/etc)

Page 5: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

5

Page 6: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

6

Page 7: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

7

Text Categorization Problem

Different level of granularity: Document Sentence Summary

Page 8: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

8

Page 9: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

9

Opionion: Formalization: Quadruple (4 components)

Page 10: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

10

Whatch out!

Date: The date is important in practice because one often wants to know how opinions change with time and opinion trends.

Page 11: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

11

Page 12: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

12

Page 13: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

13

Opionion: Formalization: Quintuple (5 components)

Page 14: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

14

Page 15: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

15

Page 16: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

16

Page 17: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

17

In which way ”sentiment” belongs to semantics?

Semantics is the study of meaning: It focuses on the relation

between signifiers, like words, phrases, signs, and symbols, and what they stand for. Through a semantics, we want to understand human language.

Through SA we want to automatically identify the meaning of certain words, phrases, etc. and how they relate to affective states expressed in texts (long, short, oral, written, etc.)

Page 18: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

18

Subjectivity & Emotion

Page 19: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

19

Subjectivity

Page 20: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

20

Emotion

Page 21: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

21

Sentiment, Subjectivity, Emotion

Page 22: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

22

Affect and Affective words…

http://research.microsoft.com/en-us/projects/tweetaffect/

Page 23: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

23

Page 24: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

24

Page 25: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

25

Basically… Text Classification!

Topic-based classificationGenre identificationAuthorship attribution

(plagiarism, authorship/classification of anonymous texts)

Spam filtersAutomatic email classification

(folder assignment)Threat identificationEtc.

Page 26: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

26

Page 27: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

27

Opinion Mining in the real world…

Page 28: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

28

UnSupervised Learning

Page 29: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

29

Supervised Classification

See Dan’s video presentation!

Page 30: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

30

Page 31: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

31

Page 32: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

32

Page 33: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

33

Page 34: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

34

Page 35: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

35

Page 36: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

36

Page 37: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

37

Page 38: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

38

Page 39: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

39

Team Work: 20 min; Discussion 15 min

You are going to apply for funding . You are interested in Horizion 2020 funding scheme (the new European research and innovation funding framework)

You think it is a good idea to create a Mood Index App.

Plan with your team mates this new sentiment-based app. Present to the audience the following aspects:

1) Purpose: what is the main use of this new app? (ex, identification of self-distructive behavior, depressive states, sad/happy mood, freindly attitudes, etc.)

2) Target users: who is going to use this app? (young people, parents, etc)3) Scenario: describe a typical scenario/context where your app is going to be used with

fruitful results4) Computational aspects: Which sentiment classes is the app going to identify? In which

language? Which computational model is going to be based upon?5) The actors: what kind of experts do you need? (ex a computational linguist, a app

developer, a psychiatrist, a company taking care of marketing and commercialization, a social worker, school teacher etc.)

6) Societal Benefits: How can the commercialization of your app contribute to decrease unemployment in your country and/or in EU.

7) Any additional aspect you might find relevant.

Page 40: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

40

How to build your own Twitter Sentiment Analysis Tool

http://blog.datumbox.com/how-to-build-your-own-twitter-sentiment-analysis-tool/

Page 41: Lecture 3: Structuring Unstructured Texts Through Sentiment Analysis

Lecture 3: Sentiment Analysis

41

This is the end… Thanks for your attention !