Skip to content
Snippets Groups Projects
Commit 036dae9d authored by Andreas Schärtl's avatar Andreas Schärtl
Browse files

report: applications: move code into a floating figure

parent 12539924
No related branches found
No related tags found
No related merge requests found
\begin{figure}
\centering
\begin{subfigure}[]{0.9\textwidth}
\begin{lstlisting}
PREFIX ulo: <https://mathhub.info/ulo#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?work
WHERE {
?work dcterms:creator|dcterms:contributor "John Smith" .
}
GROUP BY ?work
\end{lstlisting}
\caption{SPARQL query that asks for all \texttt{work}s created
by an author named ``John Smith''. ULO~does not come with
predicates for creator or contributor, instead the available
data sets take advantage of the \texttt{dcterms}
namespace~\cite{dcowl}.}\label{fig:q2a}
\end{subfigure}
\vspace{0.5cm}
\begin{subfigure}[]{0.9\textwidth}
\begin{lstlisting}
PREFIX ulo: <https://mathhub.info/ulo#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?work (COUNT(?user) as ?refcount)
WHERE {
?work dcterms:creator|dcterms:contributor "John Smith" .
?user ulo:uses ?work .
}
GROUP BY ?work
ORDER BY DESC(?refcount)
\end{lstlisting}
\caption{An adapted SPARQL~query based on~\ref{fig:q2a}. It
lists all works authored by ``John Smith'' rated by number
of references. The idea is works that were referenced more
often are more important.}\label{fig:q2b}
\end{subfigure}
\caption{{SPARQL}~queries for answering questions about authorship
and main contributions.}\label{fig:q2full}
\end{figure}
......@@ -236,38 +236,19 @@ of~$A$, that is those works that~$A$ authored that are the most
important. Importance is a quality measure, simply sorting the
result by number of references might be a good start.
\noindent\textbf{Implementation} A search for contributions by a given author
can easily be formulated in {SPARQL}.
\begin{lstlisting}
PREFIX ulo: <https://mathhub.info/ulo#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?work
WHERE {
?work dcterms:creator|dcterms:contributor "John Smith" .
}
GROUP BY ?work
\end{lstlisting}
To get the main contributions, we rate each individual
\texttt{?work} by its number of \texttt{ulo:uses}
references. Extending the {SPARQL} query above, we can query the
database for a ordered list of works, starting with the one that
has the most references.
\begin{lstlisting}
PREFIX ulo: <https://mathhub.info/ulo#>
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?work (COUNT(?user) as ?refcount)
WHERE {
?work dcterms:creator|dcterms:contributor "John Smith" .
?user ulo:uses ?work .
}
GROUP BY ?work
ORDER BY DESC(?refcount)
\end{lstlisting}
We can formulate~$\mathcal{Q}_3$ with just one SPARQL
query. Because everything is handled by the database, access
should be about as quick as we can hope it to be.
\input{applications-q3.tex}
\noindent\textbf{Implementation} A search for contributions by a given
author can easily be formulated in {SPARQL}~(Figure~\ref{fig:q2a}).
To get the main contributions, we rate each individual work
by its number of \texttt{ulo:uses} references. Extending the previous
{SPARQL}, we can query the database for a ordered list of works,
starting with the one that has the most
references~(Figure~\ref{fig:q2b}). We can formulate~$\mathcal{Q}_3$
with just one SPARQL query. Because everything is handled by the
database, access should be about as quick as we can hope it to be.
\subsubsection{Summarizing $\mathcal{Q}_1$ to $\mathcal{Q}_3$}
Experimenting with $\mathcal{Q}_1$ to $\mathcal{Q}_3$ provided us with
some insight into ULO and existing ULO exports. $\mathcal{Q}_1$ shows
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment