Introduction to SemWeb Project 2016: Semantic Wiki Loki
This is a short introduction to Semantic Wiki Loki. There is no report after this lab, but it is important to know how wiki works because we will be using it during the project
1 Loki - Introduction
Loki is a Semantic Wiki. Semantic Wiki is a
wiki system with an underlying model of knowledge. To make it simple: Loki is a wiki with a possibility to add specific RDF triples to the wiki pages. This lab will present main Loki concepts.
Let's start with the
Loki about page to get to know the system better (you can omit the „Rule-based Reasoning” section).
-
2 Page edition
-
Create a page
http://loki.ia.agh.edu.pl/ckexp/semweb2016/users:<your-login>
e.g.
http://loki.ia.agh.edu.pl/ckexp/semweb2016/users:kkutt
Enter the link to the navigation bar
If the page doesn't exist (and it shouldn't exist yet
) click
edit this page
and shortly describe yourself, e.g.
My name is Example student. I am 12 years old.
Currently I study at AGH-UST, faculty of <enter here the full name of the faculty>.
I am interested in math and philosophy.
Now, I am sitting next to: Student X and Student Z.
Save the page:
3 Categories
Let's do some RDF triples!
In Loki the subject (the first element in the triple) is the page that you are editing. So, if you are putting an annotation on
http://loki.ia.agh.edu.pl/ckexp/semweb2016/users:kkutt
page, this will the
URI of the subject for all triples.
Firstly we can state that we are users:
in RDF it looks like that:
http://loki.ia.agh.edu.pl/ckexp/semweb2016/users:kkutt rdf:type <User>.
the equivalent in the Loki is User
category.
Based on the
User manual, add your page to the
User category.
4 Properties
Based on the
User manual, annotate the content of your
User page so that it contains the following semantic information about you:
Name (first + last name)
Age
People that are sitting next to you
You favourite subject on EIS during current term (use one of three names: BIM
, Rules
, SemWeb
)
5 Inline queries
-
Using the ASK queries add to your page the list of the users whose favourite subject is the same as yours
Format the output of the query as unordered list
Build another query listing the users with the same favourite subject:
Display it as a table
Sort by age.
Define a default value if a query returns no value.
6 Semantic Web Standards
-
On your page, build 3 example SPARQL queries which asks for specific kinds of information about other users (you decide what criteria to use in the query!).
SELECT query
ASK query
DESCRIBE query
Observe the results.
-
-
Export your page. Analyze the exported file. Find the category, relations and attributes that you entered - how are they represented?
7 Reasoning
In Loki it is possible to embed Prolog code within <pl>...</pl>
tags. E.g. using Prolog code we can create a set of custom recommendations, e.g. in wiki with movies: „Movies, where the leading lady is X and the movie was made before 1940” or in wiki with countries: „City which is located in a country which is by a sea and is not listed as a member of the EU”.
-
On your user page create a section Specific users
Create a Prolog goal to select users according to some criteria (it's up to you). Optionally, you can define some interesting users with a Prolog rule and use it directly in the goal.
-
8 Ontology inside Loki
In current version of Loki, ontology will be placed in the special:ontologies:
namespace (main ontology will be available at special:ontologies:default
). Your instructor will show you how it works when it will be useful.
There is no tool that will check if we are inserting annotations accordingly to the ontology, so we will do this by hand.