%% LaTeX Beamer presentation template (requires beamer package)
%% see http://latex-beamer.sourceforge.net/
%% idea contributed by H. Turgut Uyar
%% template based on a template by Till Tantau
%% this template is still evolving - it might differ in future releases!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%  Uncomment version below for creating normal slides  %%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[c]{beamer}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%  Uncomment version below for creating handouts  %%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \documentclass[handout]{beamer}
% \usepackage{pgfpages}
% \pgfpagesuselayout{4 on 1}[a4paper, landscape, border shrink=5mm]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<presentation>
%\ Make sure the GATE theme is used
\usetheme{GATE}
%%%%% AF:
\usepackage{hhline}
\newcommand{\slug}{\hspace{1.0em}}
%%%%%
\input{slides-preamble}
\title{Effective Development with GATE}
\subtitle{and Reusable Code for Semantically Analysing Heterogeneous Documents}
\author{Adam Funk, Kalina Bontcheva}
\institute{University of Sheffield}
\date{22 May 2010}
% This is only inserted into the PDF information catalog. Can be left
% out.
\subject{Effective Development with GATE and Reusable Code for Semantically
  Analysing Heterogeneous Documents}
% 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=2cm]{university-logo}{../../images/logo.png}
%\logo{\pgfuseimage{university-logo}}
% 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{<+->}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Outline}
\tableofcontents
% You might wish to add the option [pausesections]
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]{The task: input}
  \begin{center}
    \vspace{-1.2em}
    \includegraphics[width=0.85\textwidth]{components+dataflow}
  \end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}[fragile]{The task: input}
  \begin{itemize}
  \item periodically (ideally monthly) analyse about 250~000 crawled documents
    (WSDL, HTML, PDF) relating to 25~000 web services from 8700 providers
  \item fortunately the services and providers are already instantiated and
    linked with each other and the relevant documents
  \item many duplicate documents with different URLs
  \end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}[fragile]{The task: output}
  \begin{itemize}
  \item carry out information extraction
  \item classify documents and services
  \item categorize services according to the ontology (59 subclasses of
    \emph{Category} with multiple inheritance)
  \item express output as RDF according to the project's ontology
  \end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}[fragile]{Typical batch}
  \begin{center}
    \begin{tabular}{|l@{\slug}r|}
      \hhline{|--|}
      \multicolumn{2}{|c|}{Input from the SC}\\
      Number of \texttt{.arc.gz} files & 5\\
      Total size of compressed files & 441~MB\\
      Number of documents  & $\sim$\,250~000\\
      \hhline{|--|}
      Number of Providers & $\sim$\,8~700\\
      Number of Services & $\sim$\,25~000\\
      \hhline{|--|}
      \multicolumn{2}{|c|}{Output to the CIM}\\
      Number of RDF-XML files & 30\\
      Total size of compressed files & 40~MB\\
      Number of RDF triples & $\sim$\,4~500~000\\
      \hhline{|--|}
    \end{tabular}
  \end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\section{Annotation tasks}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Annotation tasks}
  \begin{itemize}
  \item analyse WSDLs to instantiate \emph{Endpoint}, \emph{Interface}, and
    \emph{Operation} and properties associating them with each other and with
    \emph{Service} instances---\textbf{not} an NLP task, but with borrowed code
    integrated
  \item classify documents by type (e.g., documentation, pricing, contact
    details) and rate them as low-, medium-, or high-interest
  \item carry out IE to identify providers' addresses, phone numbers, e-mail
    addresses, etc.
  \item carry out IE/classification over services to identify service level
    agreements, free trials, etc.
  \item categorize each service in one or more of the 59 subclasses of
    \emph{ServiceCategory}
  \end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Implementation}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Basic principles}
  \begin{itemize}
  \item \emph{GATE Developer} for rapid development of the IE components and
    testing of most components; saving pipelines as files to be reloaded in the
    batch system
  \item GATE serial datastores for persistence; datastores and corpora for
    breaking the 250~000 documents into independently manageable chunks
  \item ANNIE as a starting point for IE
  \item JAPE for rapid development of PRs where appropriate
  \item \emph{GATE Embedded} framework and libraries for custom PRs; persistence
    (serial datastores and pipelines); document/service/provider management (by
    corpora); headless batch jobs
  \end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Implementation: preprocessing}
  \begin{itemize}
  \item Use serial datastores for persistence and manageable chunks.
  \item Use MD5 to merge duplicate documents; suppress HTTP error messages and
    empty documents: 31\% reduction.
  \item Put each provider in its own corpus.
  \item 30 datastores
  \item 8700 corpora (about 290 per datastore)
  \item 173~000 documents (average 20 per corpus, but quite variable; 5770 per
    datastore)
  \item Carry out special WSDL analysis using seekda's code and store the
    RDF-XML (generated from templates)as a document feature on each WSDL.
  \end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Analysis of a datastore}
  Pipeline series to run over each corpus:
  \begin{enumerate}
  \item standard NLP components
  \item ANNIE gazetteers and NER transducers
  \item custom gazetteers
  \item custom JAPE transducers for weighting keywords, marking documents as
    more or less interesting, etc.
  \item GATE Batch Learning PR for service categorization
  \item custom ``voting'' PRs for documents (types), services (category, free
    trials), and providers (e-mail and postal addresses); output to RDF-XML
    snippets (generated from templates) on the corpora and documents
  \end{enumerate}
  Analyse all corpora then consolidate all the RDF-XML snippets into one output
  file.
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Service categorization}
  \begin{itemize}
  \item The final version of service categorization used machine learning (SVM
    document classification) as well as weighted keywords, run through a voting
    system for each service.  ML categories were weighted to outvote keywords.
  \item See our ``Ontology-Based Categorization of Web Services with Machine
    Learning'' (also at LREC 2010) for full details and evaluation.
  \end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Ontology population}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Approaches to ontology population}
  \begin{block}{Ontology manipulation}
    \begin{itemize}
    \item Load the ontology in memory and manipulate it with the GATE Ontology
      API
    \item Allows the program to query the ontology (and validate the data) and
      modify the class and property hierarchy
    \item Output can be saved as RDF-XML, N-Triples, N3 or Turtle
    \item Everything is in memory at the same time
    \item Used in CLOnE (SEKT), RoundTrip Ontology Authoring (NEPOMUK), SPRAT and
      SARDINE (NeOn) software
    \end{itemize}
  \end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}{Approaches to ontology population}
  \begin{block}{XML generation}
    \begin{itemize}
    \item Write XML templates and fill them in using the values of specified
      annotation features (when the annotations match a template's requirements)
      or a \url{Map<String, String>}
    \item Suitable for generating instances and property values for a fixed
      class and property hierarchy
    \item No ``live'' data validation, but a good set of templates guarantees
      consistent output
    \item Generates XML snippets which can be saved in datastores as document
      and corpus features---very little in memory
    \item Used in semantic document annotation web services (MUSING and CLARIN)
      and in Service-Finder
    \end{itemize}
  \end{block}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Conclusions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\begin{frame}{Code re-use}
  \begin{center}
    \begin{tabular}{{rl}}
      from GATE & GUI, libraries, ANNIE, ML, the JAPE system\\
      from TAO & source-code tokenizer\\
      from MUSING & XML generator\\
      to NeOn & headless batch control tools\\
      to CLARIN & improved XML generator\\
    \end{tabular}
  \end{center}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\end{document}
