\documentclass{beamer}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tipa}

\usepackage{graphicx}
\usepackage{tipa}
\usepackage{multirow}
\usepackage{verbatim}

\usetheme{Montpellier} %Montpellier
\usepackage{color}
\definecolor{DarkBlue}{rgb}{0.1,0.1,0.5}
%\definecolor{Green}{rgb}{0.1,0.7,0.6}
\definecolor{Green}{RGB}{34,139,34}
\definecolor{Red}{rgb}{0.9,0.0,0.1}
\definecolor{harmaa}{cmyk}{0.3,0.1,0.1,0.4}
\usepackage{linguex}

\begin{document}


\title{Small intro to Constraint grammar}

\author{Lene Antonsen \\
Giellatekno \\ http://giellatekno.uit.no/ \\ 
}

%\date



\frame{\titlepage} 

%\frame{\frametitle{Contents}\tableofcontents} 


\frame{\frametitle{Constraint Grammar -- background}

\begin{itemize}
\item Karlsson (1990), Karlsson (1995) (cg) 
\item Tapanainen (1996) (cg2) 
\item Bick (2000) (vislcg) 
\begin{itemize}
\item \url{http://sourceforge.net/projects/vislcg/}
\item \url{http://visl.sdu.dk/constraint_grammar.html}
\end{itemize}
\end{itemize}

}

%\frame{\frametitle{Disambiguation}
%\begin{figure}
%  \centering
%  \includegraphics[scale=0.5]{manboaris.png}
%\end{figure}
%‘How old are you?’ in North Saami 
%\begin{figure}
%  \centering
%  \includegraphics[scale=0.5]{leat_multi.png}
%\end{figure}
%
%}


\frame{\frametitle{The file}
\begin{itemize}
\item DELIMITERS = "<.>" "<!>" "<?>" "<...>" "<¶>" ;  \pause
\item Sets
\begin{itemize}
\item LIST Adv = Adv ; which is equal with  (Adv) \pause
\item LIST WORD = N A Adv V Pron CC Po Pr Interj Pcle Num  ;
\item LIST PLACE-ADV =  "bajábealde" "davábealde" "lagabus" ; \pause
\item SET REAL-WORD = WORD - Num - Ord ;
\item SET MEASURE = VOLUME OR WEIGHT OR LENGTH OR AMOUNT OR TEMPERATURE OR TIME-UNIT OR ("m2") ; \pause
\end{itemize}
\item BEFORE-SECTIONS, SECTION  (x N), AFTER-SECTIONS \pause
\begin{itemize}
\item SELECT (remove other readings)
\item REMOVE (remove this reading)
\item MAP (add this tag to the reading, on no more tags)
\item ADD (add this tag to the reading, and possible more tags)
\end{itemize}
\end{itemize}

}



\frame{\frametitle{Operators}
\begin{itemize}
\item REMOVE, SELECT, MAP, ADD
\begin{itemize}
\item IF, LINK, BARRIER
\end{itemize}
\item MAP, ADD
\begin{itemize}
\item TARGET
\end{itemize}
\end{itemize}

}


\frame{\frametitle{What can we use it for?}
\begin{itemize}
\item disambiguation
\begin{itemize}
\item SELECT, REMOVE
\end{itemize}
\item adding function tags
\begin{itemize}
\item MAP, ADD
\end{itemize}
\item adding dependency numbers
\begin{itemize}
\item SETPARENT, SETCHILD
\end{itemize}
\item grammar checking
\item question-answering drills
\item lexical selection for MT
\end{itemize}

}
\frame{\frametitle{Analysers: Saami languages}

\begin{table}
\begin{center}
\begin{tabular}{|l|c|c|c|c|c|}  
\hline
Analyser & \multicolumn{5}{c|}{Languages} \\
\hline
\textbf{Lexicon/} & North S & Lule S & South S & Inari S & Kolta S  \\
\textbf{morph.} & transd. & transd. & transd. & transd. & transd. \\
\hline
\textbf{Disam-} &   &   &  & North S,  &    \\
\textbf{biguator}  & North S & Lule S & South S & ajusted & North S \\
\hline
\textbf{Functions} & \multicolumn{5}{c|}{Common Saami analysator}   \\
\hline
\textbf{Depen-} & \multicolumn{5}{c|}{ }  \\
\textbf{dency} & \multicolumn{5}{c|}{Common Saami analysator}  \\
\hline
\end{tabular} \\
\caption{Modul interaction}
\end{center}
\end{table}%
}


\frame{\frametitle{Lexical selection with Constraint Grammar}
SELECT ("rein"i) (0 ("<heagga>"i) LINK -1 num - ("okta")) ; \\
\vspace{0.5cm}
SELECT:fallback ("liv"i) (0 ("<heagga>"i)) ;
}


\frame{\frametitle{Feedback on grammar error with Constraint Grammar}

\begin{figure}
  \centering
    \includegraphics[scale=0.38]{deiven_vastas.png}
\end{figure}
‘Who did you meet at the cafe?’ ‘I {\color{blue}{meet, funny, friend}}’\\


}



\frame{\frametitle{Analysis}
\begin{figure}
  \centering
  \includegraphics[scale=0.38]{deivet_analysa.png}
%\caption{The question and answer pair is given to the analyser as one string. The given lemmas are placed in the same cohort as the QDL (question delimiter) and CG-rules map error tags to the string if they are not represented in the answer. The input is disambiguated to some degree. A CG rule maps the \texttt{\&grm-non-agr-subj-v} tag to the verb to trigger feedback on the missing subject-verbal agreement. The question-answer pair is translated in Section \ref{drills}.}
\end{figure}

}



\frame{\frametitle{Rule for detecting grammar errors}

\begin{figure}
  \centering
  \includegraphics[scale=0.4]{map_CG.png}
\end{figure} 
LIST PERSON-NUMBER-TAG = Sg1 Sg2 Sg3 Du1 Du2 Du3 Pl1 Pl2 Pl3 ;
}


\frame{\frametitle{Meta comments with Constraint Grammar}

\begin{figure}
  \centering
  \includegraphics[scale=0.4]{adjlemma.png}
\end{figure}

$\rightarrow$ "You must use the given adjective."

}

\frame{\frametitle{Implicit feedback}
\begin{figure}
  \centering
  \includegraphics[scale=0.45]{Sahka_honnega.png}
%\caption{The question and answer pair is given to the analyser as one string. The given lemmas are placed in the same cohort as the QDL (question delimiter) and CG-rules map error tags to the string if they are not represented in the answer. The input is disambiguated to some degree. A CG rule maps the \texttt{\&grm-non-agr-subj-v} tag to the verb to trigger feedback on the missing subject-verbal agreement. The question-answer pair is translated in Section \ref{drills}.}
\end{figure}

}




\frame{\frametitle{Navigating with Constraint Grammar}
\begin{figure}
  \centering
  \includegraphics[scale=0.35]{Sahka_deaja_an.png}
%\caption{The question and answer pair is given to the analyser as one string. The given lemmas are placed in the same cohort as the QDL (question delimiter) and CG-rules map error tags to the string if they are not represented in the answer. The input is disambiguated to some degree. A CG rule maps the \texttt{\&grm-non-agr-subj-v} tag to the verb to trigger feedback on the missing subject-verbal agreement. The question-answer pair is translated in Section \ref{drills}.}
\end{figure}

}


\frame{\frametitle{Rules for navigating}


\begin{figure}
  \includegraphics[scale=0.35]{add_CG.png}
\end{figure}

\begin{figure}
  \includegraphics[scale=0.35]{add_CG_tea.png}
\end{figure}


}


\frame{\frametitle{Navigating to the relevant next question}
      <text>Háliidat go gáfe vai deaja?</text> \\
      <alt target="coffee" link="sugar\_question"/> \\
{\color{red}{<alt target="tea" link="honey\_question"/>}} \\
      <alt target="negative" link="drink\_something\_else\_question"/> \\
      <alt target="default"> link="next\_topic"/>

}



\end{document}
