\documentclass{beamer}
\usecolortheme{seagull}
\setbeamertemplate{navigation symbols}{}
\usepackage{graphicx}
\usepackage{tcolorbox}
\usetikzlibrary{positioning}
\usetikzlibrary{shapes.misc}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{environ}
\usepackage[style=authoryear]{biblatex}

\usepackage{tikz}
\usetikzlibrary{shapes.geometric}

\begin{document}

\title{Resuscitating the Semantic Web}
\date{}
\author{
    Spencer Killen \\
\tiny{https://sjkillen.ca}
}

\begin{frame}
    \titlepage
\end{frame}

\begin{frame}
	\frametitle{About Me}
	\begin{itemize}
	    \item Doing knowledge representation research at UoA
		\begin{itemize}
		    \item Computer languages for human knowledge
		\end{itemize}
		\item The Semantic Web overlaps with my research
	\end{itemize}
\end{frame}

\begin{frame}
    \frametitle{A Technical Writing Problem}
    \begin{itemize}
        \item Thesis of papers
        \pause
        \item Typical math paper structure:
        \begin{itemize}
            \item Preliminaries
            \begin{itemize}
                \item Redefine definitions from other papers
                \item Adjust definitions, use different notation, express in a equivalent, different manner
            \end{itemize}
            \item The technical contributions
        \end{itemize}
    \end{itemize}
    \pause
    \item Consolidating papers is {\bf really} hard
\end{frame}

\begin{frame}
    \frametitle{Consolidating Papers}
    \begin{itemize}
        \item First, find overlap in the preliminaries sections
        \pause
        \item Rectify differences
        \begin{itemize}
            \item E.g. paper one calls thingamajig a thingamabob, but paper two calls them doohickeys.
            \item The combined work should use the same terms throughout for the same object
            \begin{itemize}
                \item It should be consistent
            \end{itemize}
        \end{itemize}
        \pause
        \item A system to make this easier?
        \begin{enumerate}
            \item Verify that vocabulary is consistent (only one word per thing)
            \item Make sure that every technical concept is defined somewhere
            \item Enhance document with links to definintion
        \end{enumerate}
    \end{itemize}
\end{frame}

\begin{frame}
    \frametitle{What is the Semantic Web?}

    \begin{itemize}
        \item Internet of unstructured documents (current)
        \item Internet of knowledge (semantic web)
    \end{itemize}
\end{frame}

\begin{frame}
 \frametitle{A Brief History of Internet ``Versions''}

 \begin{itemize}
  \item Web 1.0
  \begin{itemize}
   \item Website, basic browsing, hyperlinks
  \end{itemize}
  \pause
  \item Web 2.0
  \begin{itemize}
   \item Dynamically loaded content
   \item Infinite scroll, more interactivity, etc.
  \end{itemize}
 \end{itemize}
\end{frame}

\begin{frame}
 \frametitle{``Versions'' are Largely Marketing Slop}

    \begin{itemize}
     \item Hundreds of ``Web 2.0'' books sold
        \pause
        \item But... versions do signal a push for
        \begin{itemize}
            \item an epoch
        \end{itemize}
    \end{itemize}

\end{frame}

\begin{frame}
 \frametitle{The Semantic Web: Web 3.0}

 \begin{itemize}
     \item 2010s, people pushed the Semantic Web as Web 3.0
  \begin{itemize}
      \item Mainly academics
      \item Low industry adoption
  \end{itemize}
 \end{itemize}
\end{frame}

\begin{frame}
 \frametitle{The Semantic Web}

 \begin{itemize}
     \item A phrase coined by Tim Berners-Lee
  \begin{itemize}
      \item Who is credited for ``inventing the internet''
  \end{itemize}
 \end{itemize}
 \begin{quote}
  The essential property of the World Wide Web is its universality. The power of a hypertext link is that "anything must be able to link to anything"
  \vskip 1em
  \hfill -- Tim Berners-Lee
 \end{quote}
\end{frame}

\begin{frame}[fragile]
    \frametitle{The Semantic Web}
    \begin{itemize}
        \item In Web 1.0/2.0 documents of structured information link to each other.
        \begin{itemize}
            \item But the documents don't {\em mean} anything except to a human reader.
        \end{itemize}
        \begin{verbatim}
        <div>
            <span>1-780-468-2639</span>
            <span><a href="https://sjkillen">
                Spencer Killen
            </a></span>
            <span>sjkillen@ualberta.ca</span>
        </div>
        \end{verbatim}
    \end{itemize}
\end{frame}

\begin{frame}[fragile]
    \frametitle{Level 0: Data Annotation}
    \begin{itemize}
        \item Documents describe what they are
        \begin{verbatim}
        <div typeof="Person">
            <span property="CellPhone">
                1-780-468-2639
            </span>
            <span property="Website">
                <a href="https://sjkillen">
                    Spencer Killen
                </a>
            </span>
            <span property="Email">
                sjkillen@ualberta.ca
            </span>
        </div>
        \end{verbatim}
    \end{itemize}
\end{frame}

\begin{frame}[fragile]
    \frametitle{Level 0: Data Annotation}
    \begin{itemize}
        \item Meaning ascribed to different sections of the document
        \item There's an automated way of interrogating the web resource:
        \begin{itemize}
            \item Who is the website about?
            \begin{itemize}
                \item One person, Spencer
            \end{itemize}
            \item What is Spencer's email?
            \begin{itemize}
                \item sjkillen@uaberta.ca
            \end{itemize}
        \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}[fragile]
    \frametitle{The Good and the Bad}
    \begin{itemize}
        \item Website is {\bf more} machine readable
        \item Easier for bad corpos to mine information
        \begin{itemize}
            \item But companies will use LLMs to mine this info with or without annotation
        \end{itemize}
        \item Good actors:
        \begin{itemize}
            \item Application interoperability
            \item E.g. Very easy to build an application that looks through pages you've browsed
            \begin{itemize}
                \item ``Makes a list of the people I've read about online'' or
                \item Poll https://sjkillen.ca periodically and update Spencer's contact info
            \end{itemize}
        \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}[fragile]
    \frametitle{Level 1: Distributed Authority and Ontologies}
    \begin{itemize}
        % \item An evolution of human knowledge
        \item An information either asserts authority: \\``the sky is blue, trust me bro''
        \item or cites a source: $e = mc^2$ (Einstein 1905)
    \end{itemize}
\end{frame}


\begin{frame}[fragile]
    \frametitle{Level 1: Distributed Authority and Ontologies}
    \begin{itemize}
        \item Ideally, anything and everything should be cited
        \begin{itemize}
        \item Current methods of citation are highly limited
        \begin{itemize}
            \item We reference a book, article, etc and expect the reader to find the relevant parts.
            \item More granular systems exist (e.g. citing specific diagrams, bible verses, etc)
            \item But these systems cite some structural part of the source material, not a semantic one.
        \end{itemize}
        \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}[fragile]
    \frametitle{A Contrived Example}
    \begin{example}
    Writing a fanfic which combines Linux lore with Lord of the Rings.

    Richard Stallman is a Hobbit character.

    A reference to the Stallman Hobbit needs to cite both Linux lore and LOTR.

    How will people know which idea comes from which source?
    \end{example}
    \begin{verbatim}
<span typeof="en.wikipedia.org/Richard_Stallman">
    Richard
</span>
was a 3 foot tall
<span typeof="lotr.com/Hobbit">
    Hobbit
</span>
    \end{verbatim}
    \begin{itemize}
        \item Normal citations happen once, but we can cite every usage
    \end{itemize}
\end{frame}

\begin{frame}
    \frametitle{Authority Delegation}
    \begin{itemize}
        \item Now Wikipedia and lotr.com are the authoritative definitions of Stallman and Hobbits, respectively
    \end{itemize}
\end{frame}

\begin{frame}[fragile]
    \frametitle{Modeling Concepts, Relations, and Webs}
    \begin{itemize}
        \item Our citation doesn't describe the relation our character has to the real person our LOTR books.
    \end{itemize}

    \begin{verbatim}
<div target="OurProtagonist">
    <span property="schema.org/isBasedOn">
        <span href="en.wikipedia.org/Richard_Stallman">
                Richard
        </span>
    </span>
    was a 3 foot tall
    <span typeof="lotr.com/Hobbit">
        Hobbit
    </span>
</div>
    \end{verbatim}
\end{frame}

\begin{frame}
\frametitle{Schema.org}
\end{frame}

\begin{frame}
\frametitle{We Can Define Our Own Concepts Too!}
\begin{itemize}
    \item Someone can write a fanfic of our fanfic to cite and incorporate a new creature we define
    \item Someone browsing for stories can search to find all works that incorporate our creature
    \begin{itemize}
        \item If usages are self-reported, therefore not susceptible to AI slop errors.
    \end{itemize}
\end{itemize}
\end{frame}

\begin{frame}
    \frametitle{Level 3: Semantic Services}
    \begin{itemize}
        \item A website can use these technologies to report the services it provides
        \begin{itemize}
            \item E.g. a pi digit calculator
            \item An imperial-to-metric converting service
        \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
\frametitle{The Premature Death of the Semantic Web}

\begin{quote}
  ``A technology dies first when people stop using it, and then again when its name is lost. ''
  \vskip 1em
  \hfill -- Made up
\end{quote}
\pause
    \begin{itemize}
        \item ``Crypto/Blockchain is now Web 3.0''!
        \pause
        \begin{itemize}
            \item The name has been stolen from the Semantic Web
        \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
    \frametitle{The Arduous Knowledge Engineering Barrier}
    \begin{itemize}
        \item Implementing the semantic web takes two types of experts working in tandem:
        \begin{itemize}
            \item Experts in web technologies (knowledge engineers)
            \item Experts in the domain (e.g., Linux lore expert or LOTR expert)
        \end{itemize}
        \item This is why semantic web technologies never saw widespread adoption
    \end{itemize}
\end{frame}

\begin{frame}
    \frametitle{Reclaim the Web from the LLMs!}
    \begin{itemize}
        \item Large language models are stealing the web from us
        \begin{itemize}
            \item Automatically extracted data from websites is served in a chat client
            \item Websites aren't visited by people, just LLM scrapers
        \end{itemize}

        \pause
        \item Fighting back?
        \begin{itemize}
            \item Use LLMs to allow the domain expert to ``be the knowledge engineer''
            \begin{itemize}
                \item Ensures automatic data extraction is audited by an expert, unlike current LLMs
                \item Data is accessible and reliable
                \item Greatly decreases the cost of semantic web tech adoption
            \end{itemize}
            \item Build more tools that rely on the Semantic Web
        \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
	\frametitle{Search Over Synthesis}
	\begin{itemize}
	    \item LLMs synthesize information to answer queries
		\begin{itemize}
		    \item Slop is often wrong
			\item Synthesized sources often wrong
		\end{itemize}
		\item The semantic web can make search as powerful as chatbots
		\begin{itemize}
			\item And be correct
		\end{itemize}
	\end{itemize}
\end{frame}

\begin{frame}
    \frametitle{Semantic Web Technologies}
    \begin{itemize}
        \item RDF
        \begin{itemize}
            \item RDFa
            \begin{itemize}
                \item Used in examples. Annotate HTML with relations
            \end{itemize}
        \end{itemize}
        \item OWL
        \begin{itemize}
            \item Extends RDF with description logic
        \end{itemize}
        \item RIF
        \begin{itemize}
            \item Extends RDF with intuitionistic rule logic
        \end{itemize}
    \end{itemize}
\end{frame}

\begin{frame}
	\frametitle{The Semantic Web in the Wild}

	\begin{itemize}
	    \item ActivityPub
	\end{itemize}
\end{frame}

\begin{frame}
\frametitle{How to Get Started}
    \begin{enumerate}
        \item Learn basic HTML
            \begin{itemize}
                \item Only very basic HTML is needed.
            \end{itemize}
            \item Learn RDFa Core
            \item Annotate a document using schema.org
    \end{enumerate}
\end{frame}

% \begin{frame}
% \frametitle{Exercise}
%     \begin{itemize}
%         \item Annotate HTML with RDFa, then verify using an RDF extractor
%     \end{itemize}
% \end{frame}

\end{document}
