Commit 3e6380c7 authored by Loïc Barrault's avatar Loïc Barrault
Browse files

updating text proc and language model mainly

parent 332b77d3
......@@ -28,8 +28,7 @@
Ruslan Salakhutdinov and
Richard S. Zemel and
Yoshua Bengio},
title = {Show, Attend and Tell: Neural Image Caption Generation with Visual
Attention},
title = {Show, Attend and Tell: Neural Image Caption Generation with Visual Attention},
journal = {CoRR},
volume = {abs/1502.03044},
year = {2015},
......
......@@ -15,7 +15,6 @@ booktitle = {https://web.stanford.edu/\%7Ejurafsky/slp3/ed3book.pdf}
address = {Champaign, IL, USA},
}
@article{Stolcke:2002,
Author = {Stolcke, Andreas},
Date-Added = {2011-06-27 14:47:03 +0200},
......@@ -28,14 +27,6 @@ booktitle = {https://web.stanford.edu/\%7Ejurafsky/slp3/ed3book.pdf}
Bdsk-Url-1 = {http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.157.2429},
Bdsk-Url-2 = {http://dx.doi.org/10.1.1.157.2429}}
@article{Shannon:1948,
Author = {Shannon, Claude Elwood},
Journal = {Bell Systems Technical Journal},
Pages = {379-423,623-656},
Title = {A mathematical theory of communication},
Volume = {27},
Year = {1948}}
@inproceedings{Moses:2007:acl,
Author = {Koehn, Philipp and Hoang, Hieu and Birch, Alexandra and Callison-Burch, Chris and Federico, Marcello and Bertoldi, Nicola and Cowan, Brooke and Shen, Wade and Moran, Christine and Zens, Richard and Dyer, Chris and Bojar, Ondrej and Constantin, Alexandra and Herbst, Evan},
Booktitle = {Meeting of the Association for Computational Linguistics},
......
......@@ -261,8 +261,8 @@ du cerveau humain
\begin{block}{Minsky \& Pappert, 1969~:}
\centering {\it ``Le perceptron ne sert à rien puisqu'il ne sait même pas résoudre le ou exclusif.''}
\end{block}
\end{itemize}
\end{frame}
......
......@@ -13,9 +13,25 @@
\usepackage{multirow}
\usepackage{bm}
%\usepackage{enumitem}
\usepackage{algorithm,algorithmicx}
\usepackage[noend]{algpseudocode}
\usepackage{multicol}
\usepackage{array}
\usepackage{rotating}
\usepackage{hyperref}
%\usepackage[dvips,xetex]{graphicx}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, calc, quotes, tikzmark}
\usetikzlibrary{matrix,chains,positioning,decorations.pathreplacing,arrows}
\usepackage{pgfplots}
\usepackage{fontspec}
\newfontfamily\DejaSans{DejaVu Sans}
\usepackage[absolute,showboxes,overlay]{textpos}
\textblockorigin{10mm}{10mm} % origine des positions
......@@ -51,6 +67,8 @@
\newcommand{\half}{\frac{1}{2}} % fraction un demi
\newcommand{\R}{\mathbb{R}}
\newcommand*\colvec[1]{\begin{bmatrix}#1\end{bmatrix}}
% handy shortcuts for tables
......@@ -107,11 +125,6 @@
\DeclareMathOperator*{\argmin}{argmin}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, calc, quotes, tikzmark}
\usepackage{fontspec}
\newfontfamily\DejaSans{DejaVu Sans}
\newcommand{\annot}[2]{[#1]$_{#2}$}
......
......@@ -26,7 +26,9 @@
}
\newcommand{\source}[1]{{\color{darkgray} \tiny{[Source: #1]}}}
%\setbeamertemplate{footline}[page number]{} % change the numbering to page numbering instead of frame
\newcommand{\source}[1]{{\color{liumdarkgray} \tiny{[Source: #1]}}}
% My highlight
%\newcommand{\myhl}[2]{\colorbox{#1}{\strut #2}} %usage \myhl{color}{text}
......@@ -41,7 +43,7 @@
}
\setbeamercolor{alerted text}{fg=cyan}
\setbeamercolor{alerted text}{fg=liumcyan}
\newcommand*\circled[2]{\tikz[baseline=(char.base)]{
\node[circle,ball color=#2, shade,
......
......@@ -6,8 +6,8 @@
\newcommand{\blue}[1]{{\color{blue} #1}}
\newcommand{\cyan}[1]{{\color{cyan} #1}}
\newcommand{\orange}[1]{{\color{orange} #1}}
\newcommand{\green}[1]{{\color{darkpastelgreen} #1}}
\newcommand{\gray}[1]{{\color{gray} #1}}
\newcommand{\green}[1]{{\color{green(html/cssgreen)} #1}}
\newcommand{\gray}[1]{{\color{darkgray} #1}}
\newcommand{\edinblue}[1]{{\color{edinblue} #1}}
\newcommand{\edinred}[1]{{\color{edinred} #1}}
......@@ -19,11 +19,16 @@
\newcommand{\liumbrown}[1]{{\color{liumbrown} #1}}
\definecolor{liumgreen}{rgb}{0.010,0.350,0.188}
\newcommand{\liumgreen}[1]{{\color{liumgreen} #1}}
\definecolor{liumcyan}{HTML}{19C1BF}
%\definecolor{liumcyan}{HTML}{19C1BF}
\definecolor{liumcyan}{HTML}{005AA0}
\newcommand{\liumcyan}[1]{\textcolor{liumcyan}{#1}}
\definecolor{liumlightgray}{rgb}{0.9,0.9,0.9}
\newcommand{\liumlightgray}[1]{{\color{liumlightgray} #1}}
\definecolor{liumdarkgray}{HTML}{4D4D4D}
\newcommand{\liumdarkgray}[1]{{\color{liumdarkgray} #1}}
\newcommand<>{\myemph}[1]{\alt#2{\liumcyan{\textbf{#1}}}{#1}}
\newcommand<>{\myemphb}[1]{\alt#2{\orange{\textbf{#1}}}{#1}}
......
......@@ -229,9 +229,9 @@
%%
%% Use circles for bullets
%%
%\setbeamertemplate{items}[circle]
\setbeamertemplate{items}[circle]
%\setbeamertemplate{items}[triangle]
\setbeamertemplate{items}[ball]
%\setbeamertemplate{items}[ball]
%%
%% Now set colors/fonts for the various elements of the theme
......
......@@ -668,7 +668,7 @@ move & O\\
, & O\\
spokesman & O\\
Tim & \B{PER}\\
Wagner & \B{PER}\\
Wagner & \I{PER}\\
said & O\\
. & O
\end{tabular}
......
......@@ -540,7 +540,8 @@ Leo Tolstoy & War and Peace \\
Jane Austen & Pride and Prejudice \\
Marcel Proust & In Search of Lost Time \\
\bottomrule
\end{tabular}}
\end{tabular}
}
\end{textblock*}
\end{frame}
......
......@@ -163,13 +163,13 @@ Consider the following dummy \myemph{training} corpus of 7 movie reviews:
\vfill
\begin{tabular}{lll}
Doc & Words & Class \\ \toprule
1 & Great movie, excellent plot, renowned actors & \green{\bf positive} \\
2 & I had not seen a fantastic plot like this in good 5 years. Amazing!!! & \green{\bf positive} \\
3 & Lovely plot, amazing cast, somehow I am in love with the bad guy & \green{\bf positive} \\
4 & Bad movie with great cast, but very poor plot and unimaginative ending & \red{\bf negative} \\
1 & great movie, excellent plot, renowned actors & \green{\bf positive} \\
2 & I had not seen a fantastic plot like this in good 5 years. amazing!!! & \green{\bf positive} \\
3 & lovely plot, amazing cast, somehow I am in love with the bad guy & \green{\bf positive} \\
4 & bad movie with great cast, but very poor plot and unimaginative ending & \red{\bf negative} \\
5 & I hate this film, it has nothing original & \red{\bf negative} \\
6 & Great movie, but not... & \red{\bf negative} \\
7 & Very bad movie, I have no words to express how I dislike it & \red{\bf negative} \\
6 & great movie, but not... & \red{\bf negative} \\
7 & very bad movie, I have no words to express how I dislike it & \red{\bf negative} \\
\bottomrule
\end{tabular}
\vfill
......@@ -182,11 +182,11 @@ Doc & Words & Class \\ \toprule
\textbf{Compute prior probability of each class by relative frequency}
\begin{equation*}
p(\green{\bf positive}) = \frac{count(\green{\bf positive})}{\ds \sum_{s \in \{\green{\bf positive}, \red{\bf negative}\}}^J count(s)} = \frac{3}{7} = 0.43
p(\green{\bf positive}) = \frac{count(\green{\bf positive})}{\ds \sum_{s \in \{\green{\bf positive}, \red{\bf negative}\}} count(s)} = \frac{3}{7} = 0.43
\end{equation*}
\vfill
\begin{equation*}
p(\red{\bf negative}) = \frac{count(\red{\bf negative})}{\ds \sum_{s \in \{\green{\bf positive}, \red{\bf negative}\}}^J count(s)} = \frac{4}{7} = 0.57
p(\red{\bf negative}) = \frac{count(\red{\bf negative})}{\ds \sum_{s \in \{\green{\bf positive}, \red{\bf negative}\}} count(s)} = \frac{4}{7} = 0.57
\end{equation*}
\end{frame}
......@@ -212,12 +212,12 @@ What \textbf{features} should we consider?
\begin{center}
\begin{tabular}{lp{.7\textwidth}l}
Doc & Words & Class \\ \toprule
1 & \textbf{Great} movie, \textbf{excellent} plot, \textbf{renowned} actors & \green{\bf positive} \\
2 & I had not seen a \textbf{fantastic} plot like this in \textbf{good} 5 years. \textbf{Amazing !!!} & \green{\bf positive} \\
1 & \textbf{great} movie, \textbf{excellent} plot, \textbf{renowned} actors & \green{\bf positive} \\
2 & I had not seen a \textbf{fantastic} plot like this in \textbf{good} 5 years. \textbf{amazing !!!} & \green{\bf positive} \\
3 & \textbf{Lovely} plot, \textbf{amazing} cast, somehow I am in love with the \textbf{bad} guy & \green{\bf positive} \\
4 & \textbf{Bad} movie with \textbf{great} cast, but very \textbf{poor} plot and \textbf{unimaginative} ending & \red{\bf negative} \\
4 & \textbf{bad} movie with \textbf{great} cast, but very \textbf{poor} plot and \textbf{unimaginative} ending & \red{\bf negative} \\
5 & I hate this film, it has nothing \textbf{original} & \red{\bf negative} \\
6 & \textbf{Great} movie, but not... & \red{\bf negative} \\
6 & \textbf{great} movie, but \textbf{bad} casting... & \red{\bf negative} \\
7 & Very \textbf{bad} movie, I have no words to express how I dislike it & \red{\bf negative} \\
\bottomrule
\end{tabular}
......@@ -228,12 +228,12 @@ Doc & Words & Class \\ \toprule
\begin{center}
\begin{tabular}{lp{.7\textwidth}l}
Doc & Words & Class \\ \toprule
1 & \textbf{Great} \textbf{excellent} \textbf{renowned} & \green{\bf positive} \\
2 & \textbf{fantastic} \textbf{good} \textbf{Amazing !!!} & \green{\bf positive} \\
3 & \textbf{Lovely} \textbf{amazing} \textbf{bad} & \green{\bf positive} \\
4 & \textbf{Bad} \textbf{great} \textbf{poor} \textbf{unimaginative} & \red{\bf negative} \\
1 & \textbf{great} \textbf{excellent} \textbf{renowned} & \green{\bf positive} \\
2 & \textbf{fantastic} \textbf{good} \textbf{amazing !!!} & \green{\bf positive} \\
3 & \textbf{lovely} \textbf{amazing} \textbf{bad} & \green{\bf positive} \\
4 & \textbf{bad} \textbf{great} \textbf{poor} \textbf{unimaginative} & \red{\bf negative} \\
5 & \textbf{original} & \red{\bf negative} \\
6 & \textbf{Great} & \red{\bf negative} \\
6 & \textbf{great} \textbf{bad} & \red{\bf negative} \\
7 & \textbf{bad} & \red{\bf negative} \\
\bottomrule
\end{tabular}
......@@ -274,7 +274,7 @@ Examples:
\textbf{Compute the likelihoods for all features and given each class}
\begin{equation*}
p(t_j|s_i) = \frac{count(t_j,s_i)}{count(s_i)} \text{~~~~~~\ra\ \textbf{relative frequency}}
p(t_j|s_i) = \frac{count(t_j,s_i)}{ \sum_{j,k} count(t_j, s_k)} \text{~~~~~~\ra\ \textbf{relative frequency}}
\end{equation*}
\centering
......
%!TEX root = text_processing.tex
%!TEX root = text_processing_L1.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
......@@ -17,9 +17,9 @@
\frametitle{The world is digital!}
\centering
\includegraphics[width=0.75\textwidth]{digital_around_world}
\includegraphics[width=0.75\textwidth]{digital_around_world2020}
\source{https://www.smartinsights.com/social-media-marketing/social-media-strategy/new-global-social-media-research/}
\source{https://wearesocial.com/blog/2020/07/digital-use-around-the-world-in-july-2020}
\end{frame}
......@@ -32,11 +32,17 @@ 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)
\item experience in restaurants (Yelp!, Trip Advisors)
\item experience in restaurants (Yelp!, Trip Advisor)
\item community websites (Facebook, Twitter, Instagram, LinkedIn, Reddit, Flickr)
\end{itemize}
%\end{block}
\begin{itemize}
\item Large quantity of information \ra\ cannot be processed by humans
\item[\ra] Companies wants business intelligence!
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -46,7 +52,7 @@ People express their \alert{emotions}, \alert{sentiments} or \alert{opinions}
%\begin{block}{Extract \alert{emotions}, \alert{sentiments} or \alert{opinions}}
Extract \alert{emotions}, \alert{sentiments} or \alert{opinions}
\begin{itemize}
\item expressed by humans in \textbf{texts}
\item Expressed by humans in \textbf{texts}
\item Use that information for business or intelligence purposes
\item[\ra] Answer questions like:
\begin{itemize}
......
......@@ -44,7 +44,7 @@
\item Corpus (supervised machine learning)
\begin{itemize}
\item Naive Bayes
\item \alert{Deep Learning (?)}
\item \alert{Deep Learning} \ra\ see last lecture
\end{itemize}
\end{itemize}
\item Evaluation of sentiment analysis approaches
......
......@@ -39,7 +39,7 @@
\item Corpus based
\begin{itemize}
\item Naive Bayes
\item Deep Learning
\item \alert{Deep Learning}
\end{itemize}
\end{itemize}
}
......@@ -89,7 +89,7 @@ Rule-based \textbf{sentiment classifier} at \textbf{feature} level
\begin{itemize}
\item Assume \myemph{feature} can be identified in a previous step \ra\ battery, phone, screen
\item Identify \myemph{emotion} associated with those \myemph{features}
\item count \red{\bf negative} and \green{\bf positive} emotion words/phrases rom the lexicon
\item count \red{\bf negative} and \green{\bf positive} emotion words/phrases from the lexicon
\item feature is
\begin{itemize}
\item \red{\bf negative} if more negative than positive
......@@ -273,7 +273,7 @@ Rule-based \textbf{gradable sentiment classifier}
\item Ex.: "I am feeling very good"
\item[\ra] \green{\bf new emotion(good)} = $(+3 ~ \liumcyan{+1})$ = \green{\bf +4}
\item Ex.: "This was an extremely boring game" and in the lexicon: \red{\bf emotion(boring) = -3}
\item[\ra] \red{\bf new emotion(boring)} = $(-3 ~ \liumcyan{-2})$ = \red{\bf +5}
\item[\ra] \red{\bf new emotion(boring)} = $(-3 ~ \liumcyan{-2})$ = \red{\bf -5}
\end{itemize}
\end{itemize}
\end{frame}
......
......@@ -45,35 +45,7 @@
}
%\date{09 janvier 2017}
% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:
%\pgfdeclareimage[height=0.5cm]{logo_UNIV_LEMANS}{logo_UNIV_LEMANS}
%\logo{\pgfuseimage{logo\_UNIV\_LEMANS}}
%\logo{\includegraphics[height=2cm]{logo_UNIV_LEMANS}}
%\logo{\epsfbox{liumlogo.eps}}
% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
%\AtBeginSubsection[]
%{
% \begin{frame}<beamer>
% \frametitle{Outline}
% \tableofcontents[currentsection,currentsubsection]
% \end{frame}
%}
% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command:
%\beamerdefaultoverlayspecification{<+->}
%\setbeamercovered{transparent=50}
%\newtheorem{conclusion}[theorem]{Conclusions}
\date{}
\begin{document}
......@@ -83,6 +55,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{textproc_introduction}
\input{textproc_assessment.tex}
\input{sa_intro.tex}
\input{sa_definition.tex} % 1st lecture
......@@ -104,8 +77,6 @@
\begin{frame}[allowframebreaks]
\frametitle{References}
% \bibliographystyle{amsalpha}
% \bibliographystyle{apalike}
\bibliographystyle{IEEEtran}
{\footnotesize \bibliography{refs,refs_sa} }
\end{frame}
......
......@@ -22,6 +22,7 @@
\input ../macros_en.tex
\input ../macros_beamer.tex
%\usepackage[ tagged ]{ accessibility }
\usepackage{setspace}
%\setbeamercovered{transparent}
......@@ -44,7 +45,8 @@
Department of Computer Science\\
}
\date{November 12, 2019}
%\date{November 12, 2019}
\date{}
\begin{document}
......@@ -65,8 +67,6 @@
\begin{frame}[allowframebreaks]
\frametitle{References}
% \bibliographystyle{amsalpha}
% \bibliographystyle{apalike}
\bibliographystyle{IEEEtran}
\bibliography{refs,refs_sa}
\end{frame}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment