sa_definition.tex 23.7 KB
Newer Older
1
%!TEX root = text_processing_L1.tex
2
3
4
5
6
7
8

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{}

\vfill
\centering
Loïc Barrault's avatar
Loïc Barrault committed
9
\Huge{\edinred{[Sentiment Analysis]\\Motivations, definitions and more}}
10
11
12
13
14
15
16
17
18
19


\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{The world is digital!}

\centering 
20
\includegraphics[width=0.75\textwidth]{digital_around_world2020}
21

22
\source{https://wearesocial.com/blog/2020/07/digital-use-around-the-world-in-july-2020}
23
24
25
26
27
28
29
30
31
32
33
34

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{The world is digital!}

%\begin{block}{People express their \alert{emotions}, \alert{sentiments} or \alert{opinions}}
People express their \alert{emotions}, \alert{sentiments} or \alert{opinions}
\begin{itemize}
\item comments on products (Amazon, Rakuten)
\item comments on movies (Rotten Tomatoes, IMDB, Youtube)
35
\item experience in restaurants (Yelp!, Trip Advisor)
36
37
38
39
\item community websites (Facebook, Twitter, Instagram, LinkedIn, Reddit, Flickr)
\end{itemize}
%\end{block}

40
41
42
43
44
45
\begin{itemize}
\item Large quantity of information \ra\ cannot be processed by humans
\item[\ra] Companies wants business intelligence!
\end{itemize}


46
47
48
49
50
51
52
53
54
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{General goal of SA}

%\begin{block}{Extract \alert{emotions}, \alert{sentiments} or \alert{opinions}}
Extract \alert{emotions}, \alert{sentiments} or \alert{opinions}
\begin{itemize}
55
\item Expressed by humans in \textbf{texts}
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
\item Use that information for business or intelligence purposes
\item[\ra] Answer questions like:
\begin{itemize}
\item Do people liked this movie?
\item Do people agree with this law?
\item Customers: should you buy this washing machine?
\item Prediction: who will win next election?
\end{itemize}
\end{itemize}
%\end{block}

\begin{block}{Sentiment analysis = opinion mining}
\begin{itemize}
\item considered as equivalent in our case...
\item ...although a sentiment does not necessarily express an opinion!
\end{itemize}
\end{block}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Importance of SA}

%\begin{block}{\alert{To make decisions!}}
\alert{To make decisions!}
\begin{itemize}
Loïc Barrault's avatar
Loïc Barrault committed
83
\item Politics: can replace surveys, polls, etc.
84
\item Market: complete/verify/correct vendor's advice
Loïc Barrault's avatar
Loïc Barrault committed
85
\item Television: decide wether to continue or stop a TV show
86
87
88
89
90
91
92
93
94
95
96
97
98
\item at a larger scale!
\item[\ra] people express themselves on the web on any subject
\item[\ra] provides an estimate of the global opinion
\end{itemize}
%\end{block}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Example: social media monitoring}

\begin{center} 
Loïc Barrault's avatar
Loïc Barrault committed
99
\includegraphics[width=0.6\textwidth]{twitter-sentiment-analysis}
100
101
\end{center}

Loïc Barrault's avatar
Loïc Barrault committed
102
\begin{center}
103
104
\source{https://www.heidislojewski.com/blog/2016/3/11/m301ztb9orke84cuhwc37j1wwumn6n}
%https://www.kaggle.com/crowdflower/twitter-airline-sentiment and
Loïc Barrault's avatar
Loïc Barrault committed
105
\end{center}
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{An example + concepts}


\begin{block}{An example}
\only<1>{\myhl{white}{\myhl{white}{@JetBlue}, \myhl{white}{\myhl{white}{I} normally \myhl{white}{\includegraphics[width=.3cm]{heart} you}}, but this \myhl{white}{Late Flight flight experience} \myhl{white}{was the worst.}} \myhl{white}{2 hours on runway, no wifi \& tv not working properly}}
\only<2>{\myhl{white}{\myhl{white}{@JetBlue}, \myhl{white}{\myhl{white}{I} normally \myhl{green!30}{\includegraphics[width=.3cm]{heart} you}}, but this \myhl{white}{Late Flight flight experience} \myhl{white}{was the worst.}} \myhl{white}{2 hours on runway, no wifi \& tv not working properly}}
\only<3>{\myhl{white}{\myhl{white}{@JetBlue}, \myhl{lightgray}{\myhl{lightgray}{I} normally \myhl{green!30}{\includegraphics[width=.3cm]{heart} you}}, but this \myhl{white}{Late Flight flight experience} \myhl{white}{was the worst.}} \myhl{white}{2 hours on runway, no wifi \& tv not working properly}}
\only<4>{\myhl{white}{\myhl{white}{@JetBlue}, \myhl{lightgray}{\myhl{lightgray}{I} normally \myhl{green!30}{\includegraphics[width=.3cm]{heart} you}}, but this \myhl{white}{Late Flight flight experience} \myhl{red!40}{was the worst.}} \myhl{white}{2 hours on runway, no wifi \& tv not working properly}}
\only<5>{\myhl{white}{\myhl{cyan!40}{@JetBlue}, \myhl{lightgray}{\myhl{lightgray}{I} normally \myhl{green!30}{\includegraphics[width=.3cm]{heart} you}}, but this \myhl{blue!20}{Late Flight flight experience} \myhl{red!40}{was the worst.}} \myhl{white}{2 hours on runway, no wifi \& tv not working properly}}
Loïc Barrault's avatar
Loïc Barrault committed
121
122
123
%\only<6>{\myhl{white}{\myhl{cyan!40}{@JetBlue}, \myhl{lightgray}{\myhl{lightgray}{I} normally \myhl{green!30}{\includegraphics[width=.3cm]{heart} you}}, but this \myhl{blue!20}{Late Flight flight experience} \myhl{red!40}{was the worst.}} \myhl{white}{2 hours on runway, no wifi \& tv not working properly}}
\only<6>{\myhl{white}{\myhl{cyan!40}{@JetBlue}, \myhl{lightgray}{\myhl{lightgray}{I} normally \myhl{green!30}{\includegraphics[width=.3cm]{heart} you}}, but this \myhl{blue!20}{Late Flight flight experience} \myhl{red!40}{was the worst.}} \myhl{orange!30}{2 hours on runway, no wifi \& tv not working properly}}
\only<7>{\myhl{white}{\myhl{cyan!40}{@JetBlue}, \myhl{lightgray}{\myhl{brown!90}{I} normally \myhl{green!30}{\includegraphics[width=.3cm]{heart} you}}, but this \myhl{blue!20}{Late Flight flight experience} \myhl{red!40}{was the worst.}} \myhl{orange!30}{2 hours on runway, no wifi \& tv not working properly}}
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
\end{block}

\begin{itemize}
\item<2->  "\includegraphics[width=.3cm]{heart} you" is a positive \textbf{opinion}
\item<3->  "I normally \includegraphics[width=.3cm]{heart} you" is a less positive \textbf{opinion}
\item<4-> "was the worst." is a negative \textbf{opinion}
\item<5-> "@JetBlue" and "Late Flight flight experience": the \textbf{target of opinions}
%\item<6->  is the \textbf{target of opinion}
\item<6-> "2 hours on runway, no wifi \& tv not working properly" is the \textbf{objective} part
\item<7-> "I" is the \textbf{holder of opinion}
\end{itemize}

%567765664459669504	negative	1	Late Flight	0.6632	Delta		gczark		0	@JetBlue, I normally ❤️ you, but this Late Flightst flight experience was the worst. 2 hours on runway, no wifi &amp; tv not working properly		2015-02-17 11:20:57 -0800	New York, NY	Eastern Time (US & Canada)
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Target of opinions}

\begin{itemize}
\item \textbf{Target of opinions} is a \myemph{person}, \myemph{event}, \myemph{organisation}, or \myemph{topic}
\item Represented as a hierarchy of \myemph{components} having a set of \myemph{attributes} 
	\begin{itemize}
	\item[\ra] let's call them both \myemph{features}
	\end{itemize}
\item An \textbf{opinion} is expressed on any \myemph{feature}
\end{itemize}

\begin{textblock*}{60mm}[0,0](80mm,20mm)
    \includegraphics[width=0.95\textwidth]{target_opinions}
\end{textblock*}

\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Factual vs. subjective data}

\begin{block}{Facts}
\begin{itemize}
\item \emph{\textbf{something that is known to have happened or to exist, for which proof or information exists}}
\item can be expressed using \emph{keywords}
\item less/not subject to interpretation
\item might be difficult to identify though!
\end{itemize}
\end{block}

\begin{block}{Opinions / subjective data}
\begin{itemize}
\item \emph{\textbf{a thought, belief, judgment about something or someone}}
\item no proof required
\item can be hard to express with keywords
\end{itemize}
\end{block}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Factual vs. subjective data: examples}

\begin{block}{What do people think of }
\begin{itemize}
% negative and/or positive?
\item @SouthwestAir just did, thank you
% negative
\item @united which is why my next flights to Miami will be on another airline.
% negative in the corpus
\item @JetBlue please provide me your direct email for me to explain.
% negative
\item @united worst service ever \includegraphics[width=.3cm]{devil} 

\item It costed 500 dollars.
\item It costed 500 dollars!!!

\end{itemize}
\end{block}

\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Subjectivity analysis}

\textbf{Subjectivity classification} is often the first step for sentiment analysis.

Aims: decide whether a text is \textbf{objective} of \textbf{subjective}
\begin{itemize}
\item \textbf{objective}: It costed 500 dollars.
\item \textbf{subjective}:  this Late Flight flight experience was the worst.
\item[]
\end{itemize}

However, it is not always as simple as that...
\begin{itemize}
\item \textbf{objective} sentences can express opinion \myemph{indirectly}: 
	\begin{itemize}
	\item \textit{My phone broke in the second day.} 
	\end{itemize}

\item \textbf{subjective} sentences do not always express positive of negative opinions:  
	\begin{itemize}
	\item \textit{I think they will refund us.}
	\end{itemize}

\end{itemize}
\end{frame}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Bing Liu's model for Sentiment Analysis}

An \textbf{opinion} is a quintuple $(o_j, f_{jk}, so_{ijkl}, h_i, t_l)$, where:
\begin{itemize}
\item $o_j$ is the targeted \myemph{object} of opinion. Also called \myemph{entity}.
\item $f_{jk}$ is a \myemph{feature} of the object $o_j$. Also called \myemph{aspect}.
\item $so_{ijkl}$ is the \myemph{sentiment value}\tikzmark{a}
\item $h_i$ is the \myemph{sentiment holder}
\item $t_l$ is the \myemph{time}
\end{itemize}

$so_{ijkl}$ can take several forms:
\begin{itemize}
\item positive, negative, neutral
\item 1 to 5 stars, as in movie reviews
\item more granular ratings.
\end{itemize}

\begin{textblock*}{50mm}[0,0](120mm,10mm)
	\tikzmark{b}
    \includegraphics[width=0.2\textwidth]{icons_vertical}
\end{textblock*}


\begin{tikzpicture}[overlay,remember picture]
    \draw[very thick, -Stealth]         ($({pic cs:a})+(1ex,0ex)$)  to [bend right, sloped, ""]  ($({pic cs:b})+(-1ex,15ex)$);
\end{tikzpicture}




\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Example}

\only<1>{
\begin{block}{On 25th Oct. 2018, John Doe wrote:  }
“I bought the new iPhone a few days ago. It was such a nice phone. The touch screen was really cool. The voice quality was clear too. 
Although the battery life is not long, that is ok for me. However, my mother was mad with me as I did not tell her before I bought the phone. She also thought the phone was too expensive, and wanted me to return it to the shop.”
\end{block}}

%cyan!40
%green!30
%brown!90
\only<2>{
\begin{block}{On \myhl{orange}{25th Oct. 2018}, John Doe wrote:  }
\myhl{brown!90}{I} bought the new \myhl{cyan!40}{iPhone} a few days ago. It was \myhl{green!30}{such a nice} \myhl{blue!20}{phone}. The \myhl{blue!20}{touch screen} was \myhl{green!30}{really cool}. The \myhl{blue!20}{voice quality} was \myhl{green!30}{clear} too. 
Although the \myhl{blue!20}{battery life} is \myhl{red!40}{not long}, that is ok for me. However, my mother was mad with me as I did not tell her before I bought the phone. \myhl{brown!90}{She} also thought the \myhl{blue!20}{phone} was \myhl{red!40}{too expensive}, and wanted me to return it to the shop.”
\end{block}
\begin{itemize}
\item \myhl{cyan!40}{$o_j$}: iPhone
\item \myhl{blue!20}{$f_{jk}$}: phone, touch screen, voice quality, battery life, phone
\item $so_{ijkl}$: \myhl{green!30}{positive}, \myhl{green!30}{positive}, \myhl{green!30}{positive}, \myhl{red!40}{negative}, \myhl{red!40}{negative}
\item \myhl{brown!90}{opinion holder $h_i$} : I, I, I, I, mother
\item time \myhl{orange}{$t_l$} : 25/10/2018
\end{itemize}
}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis}

\begin{block}{\textbf{Opinion mining}}
\begin{itemize}
\item Discover all quintuples $(o_j, f_{jk}, so_{ijkl}, h_i, t_l)$ in a document
\end{itemize}
\end{block}


\begin{itemize}
\item \textbf{Structure the unstructured}
\begin{itemize}
	\item Use in data visualisation tools
	\item \myemph{Quantitative} and \myemph{qualitative} analysis
	\item[]
	\item To answer questions like:
		\begin{itemize}
		\item Do people like the new iPhone?
		\item Among them, what are the features that they most dislike?
		\item Among people that don't like the iPhone, what feature is missing?
		\end{itemize}
	\end{itemize}
\end{itemize}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: not just ONE problem}

Discover all quintuples $(o_j, f_{jk}, so_{ijkl}, h_i, t_l)$ in a document
\begin{itemize}
\item $o_j$ -- the target \myemph{object} or \myemph{entity}: 
	\begin{itemize}
	\item \textbf{Named Entity Recognition}.
	\item \textbf{Coreference resolution}.
	\end{itemize}
\item $f_{jk}$ -- a \myemph{feature} or \myemph{aspect}: \textbf{Information Extraction} (more about that later...).
\item $so_{ijkl}$ -- \myemph{sentiment value}: \textbf{Sentiment Identification}
\item $h_i$ -- \myemph{sentiment holder}: \textbf{Information/Data Extraction}
\item $t_l$ -- \myemph{time}: \textbf{Information/Data Extraction}
\end{itemize}



\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: granularity: document level}

\begin{itemize}
\item \myemph{Document} level
\begin{itemize}
\item Assumption: document focuses on a \textbf{single object} from a \textbf{single opinion holder}.
\item Goal: discover $(\_,\_,so,\_,\_)$
\item[\ra] ignore $o_j, f_{jk}, h_i, t_l$
\item[]
\item \textbf{Reviews} usually satisfy the assumption
\begin{itemize}
\item Positive = 4 or 5 \FiveStarOpen, Neutral = 3 \FiveStarOpen, Negative = 1 or 2 \FiveStarOpen
\end{itemize}
\end{itemize}



\end{itemize}


\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: granularity: sentence level}

\begin{itemize}
\item<+-> \myemph{Sentence} level SA is similar to document level
\begin{itemize}
\item Assumption: sentence contains a \textbf{single opinion} from a \textbf{single opinion holder}
\item Only an \textbf{intermediate} step
\item Consists of two steps:
	\begin{enumerate}
	\item \myemph{Subjectivity} classification \Ra\ \textbf{detect} if the sentence expresses an opinion
	\item \myemph{Sentiment} classification \Ra\ identifies the sentence \textbf{polarity}
	\end{enumerate}
\end{itemize}
\end{itemize}
\begin{enumerate}
\item<+-> \myemph{Subjectivity} classification
\begin{itemize}
\item Bootstrapping method \cite{Riloff2003}
\item Sentence similarity \cite{Yu2003}
\item Naive Bayes
\end{itemize}

\item<+-> \myemph{Sentiment} classification
\begin{itemize}
\item Rule-based
\item Corpus -based
\item[\ra] detailed later... stay tuned!
\end{itemize}

\end{enumerate}
\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: granularity: feature level 1/2}

\begin{block}{Motivation}
\begin{itemize}
\item Document and sentences may contain \textbf{mixed} opinions
\item \textbf{Targets} of opinions (\myemph{features}) are ignored 
\item[\ra] SA at this level provides a \textbf{general} opinion on the \myemph{object}
\item[\ra] Does not mean that \myemph{opinion holder} likes/dislikes everything about it.
\end{itemize}
\end{block}

\begin{itemize}
\item \myemph{Feature} level aims to provide a more fine-grained analysis
\begin{itemize}
\item \textbf{which} component people like/dislike
\item[\ra] more informative analysis
\item consists of 5 steps
\end{itemize}

\end{itemize}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: granularity: feature level 2/2}

\begin{enumerate}
\item<+-> Identify \myemph{entities} or \myemph{objects}
\begin{itemize}
%\item Similar to NER with some differences
\item Given a set $Q$ of \textbf{seed entities} of class $C$, and a set $D$ of \textbf{candidate entities}, determine which of the entities in $D$ belong to $C$.
\item[\ra] binary classification problem
\end{itemize}

\item<+-> Extract object \myemph{features} that have been commented on by the \myemph{opinion holder}
\begin{itemize}
\item Frequency-based methods \cite{Hu2004}
\item Challenge: infrequent feature extraction 
\end{itemize}

\item<+-> Group similar \myemph{features}
\begin{itemize}
	\item \eg\ \emph{screen} and \emph{touch screen}
	\item \eg\ \emph{power usage} and \emph{battery life}
\end{itemize}

\item<+-> Classify the opinions as \green{\bf positive}, \orange{\bf neutral} or \edinred{\bf negative}
\begin{itemize}
\item[\Ra] detailed later 
\end{itemize}

\item<+->{} [optional] Produce a summary of all feature-based opinions
\end{enumerate}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: result}

\begin{textblock*}{45mm}[0,0](100mm,-10mm)
\begin{block}{{\fontsize{4}{2}\selectfont On \myhl{orange}{25th Oct. 2018}, John Doe wrote:  }}
\begin{spacing}{0.5}
{\fontsize{4}{2}\selectfont\myhl{brown!90}{I} bought the new \myhl{cyan!40}{iPhone} a few days ago. It was \myhl{green!30}{such a nice} \myhl{blue!20}{phone}. The \myhl{blue!20}{touch screen} was \myhl{green!30}{really cool}. The \myhl{blue!20}{voice quality} was \myhl{green!30}{clear} too. Although the \myhl{blue!20}{battery life} is \myhl{red!40}{not long}, that is ok for me. However, my mother was mad with me as I did not tell her before I bought the phone. \myhl{brown!90}{She} also thought the \myhl{blue!20}{phone} was \myhl{red!40}{too expensive}, and wanted me to return it to the shop.”}
\end{spacing}    
\end{block}
\end{textblock*}

\begin{center}
\begin{tabular}{p{2.5cm}cl}
Component &  Polarity & Comment \\ \toprule
\textbf{Feature1} 	& \MR{3}{*}{\green{Positive} } & The touch screen was really cool.  \\
\emph{screen}		& 	& \small{The touch screen was so easy to use and can do amazing things.} \\
\emph{touch screen}  & & The screen is so fluid! \\ \cmidrule{2-3}
				& \MR{2}{*}{\edinred{Negative} } & The screen is easily scratched.  \\
				&				  & \small{It's very difficult to remove finger marks from the touch screen.} \\ \midrule
\textbf{Feature2}	& \MR{2}{*}{\green{Positive}} & The battery stood for 2 days.\\
\emph{battery life}	& & The battery lasts very long. \\ \cmidrule{2-3}
				& \MR{2}{*}{\edinred{Negative}} & I had to charge it after 2 hours... \\
				&  & ... \\
\bottomrule
\end{tabular}
\end{center}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: opinion observer}

\only<1>{
\centering    \includegraphics[width=0.8\textwidth]{sa_summary}

Summary of reviews for smartphone 1
}
\only<2>{
\centering    \includegraphics[width=0.8\textwidth]{sa_summary_comp}

Comparison of summaries of reviews for two smartphones
}

\cite{Liu2005}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: indicators}

\begin{itemize}
\item absolute number of expressed opinions and proportion
\end{itemize}

\centering    \includegraphics[width=0.7\textwidth]{sa_opinion_proportion}

\cite{Liu2011}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: indicators}

\begin{itemize}
\item evolution of opinions across time
\end{itemize}

\centering    \includegraphics[width=0.7\textwidth]{sa_opinion_trend}

\cite{Liu2011}
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: challenges}

\only<1>{
On \myhl{white}{4th Nov. 2018}, \myhl{white}{John Doe} wrote:  \\
This past Saturday, \myhl{white}{I} bought a \myhl{white}{Nokia} phone and \myhl{white}{my girlfriend} bought a \myhl{white}{Motorola} phone with \myhl{white}{Bluetooth}. 
We called each other when we got home.\\
The \myhl{white}{voice} on \myhl{white}{my} phone \myhl{white}{was not so clear}, \myhl{white}{worse than my previous phone.}\\
The \myhl{white}{battery life} \myhl{white}{was short too.} \\
\myhl{white}{My girlfriend} \myhl{white}{was quite happy with her phone.}\\
\textbf{I wanted} a phone with good \myhl{white}{sound quality}. 
So \myhl{white}{my} \myhl{white}{purchase} \myhl{white}{was a real disappointment}. \\
I returned the phone yesterday.
}

\only<2->{
On \myhl{orange}{4th Nov. 2018}, \myhl{brown!90}{John Doe} wrote:  \\
%\begin{spacing}{0.5}
562
This past Saturday, \myhl{brown!90}{\tikzmark{a0}I} bought a \myhl{cyan!40}{\tikzmark{a1}Nokia} phone and \myhl{brown!90}{\tikzmark{b0}my girlfriend} bought a \myhl{cyan!40}{\tikzmark{b1}Motorola} phone with \myhl{cyan!40}{Bluetooth}. 
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
We called each other when we got home.\\
The \myhl{blue!20}{voice\tikzmark{a2}} on \myhl{brown!90}{my} phone \myhl{red!40}{was not so clear}, \myhl{red!40}{worse than my previous phone.}\\
The \myhl{blue!20}{battery life\tikzmark{a3}} \myhl{red!40}{was short too.} \\
\myhl{brown!90}{My girlfriend} \myhl{green!30}{was quite happy with her phone\tikzmark{b2}.}\\
\textbf{I wanted} a phone with good \myhl{blue!20}{sound quality}. 
So \myhl{brown!90}{my} \myhl{blue!20}{\tikzmark{a4}purchase} \myhl{red!40}{was a \tikzmark{a5}real disappointment}. \\
I returned the phone yesterday. \\

\vspace{1cm}

 \textbf{\ra\ Identify all the components of an opinion}
}

\only<3>{

 \textbf{\ra\  Identify the relations}

\begin{tikzpicture}[overlay,remember picture]
581
    \draw[very thick, -Stealth, carminered]         ($({pic cs:a0})+(1ex,2ex)$)  to [bend left, sloped, ""]  ($({pic cs:a1})+(1ex,+2ex)$);
582
583
584
585
586
    \draw[very thick, -Stealth, carminered]         ($({pic cs:a1})+(1ex,-1ex)$)  to [bend left, sloped, ""]  ($({pic cs:a2})+(1ex,+1ex)$);
    \draw[very thick, -Stealth, carminered]         ($({pic cs:a1})+(1ex,-1ex)$)  to [bend left, sloped, ""]  ($({pic cs:a3})+(1ex,+1ex)$);
    \draw[very thick, -Stealth, carminered]         ($({pic cs:a1})+(1ex,-1ex)$)  to [bend left, sloped, ""]  ($({pic cs:a4})+(3ex,+2ex)$);
    \draw[very thick, -Stealth, carminered]         ($({pic cs:a4})+(3ex,2ex)$)  to [bend left, sloped, ""]  ($({pic cs:a5})+(2ex,+2ex)$);
        
587
    \draw[very thick, -Stealth, carnationpink]         ($({pic cs:b0})+(2ex,2ex)$)  to [bend left, sloped, ""]  ($({pic cs:b1})+(1ex,+1em)$);
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
    \draw[very thick, -Stealth, carnationpink]         ($({pic cs:b1})+(3em,-1ex)$)  to [bend left, sloped, ""]  ($({pic cs:b2})+(1ex,+1ex)$);
\end{tikzpicture}
}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Sentiment Analysis: Challenges}

Discover all quintuples $(o_j, f_{jk}, so_{ijkl}, h_i, t_l)$ in a document
\begin{itemize}
\item $o_j$ -- the target \myemph{object} or \myemph{entity}: 
	\begin{itemize}
	\item \textbf{Named Entity Recognition}.
	\item \textbf{Coreference resolution}.
	\end{itemize}
\item $f_{jk}$ -- a \myemph{feature} or \myemph{aspect}: \textbf{Information Extraction} (more about that later...).
\item $so_{ijkl}$ -- \myemph{sentiment value}: \textbf{Sentiment Identification}
\item $h_i$ -- \myemph{sentiment holder}: \textbf{Information/Meta-Data Extraction}
\item $t_l$ -- \myemph{time}: \textbf{Information/Meta-Data Extraction}
\end{itemize}

In addition:
\begin{itemize}
\item \textbf{Relation Extraction}
\item \textbf{Synonym match}: e.g. "voice" == "sound quality"
\end{itemize}

\end{frame}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\begin{frame}
%  \frametitle{Sentiment Analysis: principle}
%\begin{block}{}
%    \begin{itemize}
%    \item 
%    \end{itemize}
%\end{block}
%
%\centering 
%\includegraphics[width=0.75\textwidth]{tp_concept}
%
%\end{frame}