User Tools

Site Tools


1.5h Tour through our tools

These instructions may be done in Loki demo1). Feel free to register using Register option at the top right corner of the page.

All links and examples here will assume that you are using our Loki demo.

Semantic wiki

1. Simple wiki page

First of all, let's create a simple wiki page.

To create it, you have to enter it's address in web browser by hand, e.g. to create the page foo:bar (page bar in namespace foo) simply open the address and select “Create this page” option from page menu on the right hand side.

To get familiar with wiki editor and text formatting options, create two new pages in a wiki:

  • one describing one of your favorite movie (name it movie:[MOVIE_NAME])
  • and the other describing the person (actor, director, etc) associated with this movie (persons:[NAME_SURNAME])

2. Ontology creation

Within wiki we will use some annotations to describe the classes (categories), object properties (relations) and data properties (attributes). Before we do this, we have to prepare an ontology to provide a “big picture” view on the system.

  • Loki has a possibility to create ontologies. They are saved as a regular wiki pages placed in special:ontology: namespace.
  • They represent:
    • all available categories (classes)
    • relations between categories (classes)
    • available relations between instances, i.e. wiki pages (object properties)
    • possible attributes and their values' types (e.g. xsd:string, xsd:integer or other xsd types)
    • relations between properties (e.g. subPropertyOf)
  • The default ontology is always available on the default page, e.g. in demo:

As we are describing movies and people, the default ontology represents these concepts. Think a while about it. Is something missing? Or something is wrong? If so, correct it :-) (and observe that page editor changes the behaviour for the ontologies pages)

You can also create your own simple ontology on other page, e.g. special:ontology:[YOUR_LOGIN]

3. Page annotation

Let's do some semantic magic! Let's annotate pages created in the 1. Simple wiki page section!

  1. 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 page, this will the URI of the subject for all triples.
  2. Firstly we can state the classes (categories) of the pages:
    1. In RDF it looks like that:   rdf:type   <actor>.
    2. The equivalent in the Loki is actor category.
    3. Based on the Defining categories section from Tutorial, annotate your pages with the proper categories.
    4. How do I find out what the correct category name is? Here ontology prepared in the previous section is useful - simply open the ontology at and search for ID of proper class, e.g. to annotate the Horror Movie you can use the horrorMovie category name.
      • This functionality is under heavy development now - the editor will offer the code completion capabilities in near future (so it will help you not to make errors with annotations :-) )
  3. In the same way we can annotate the wiki pages with object properties (relations to other wiki pages, e.g. movie is related to its director) and data properties (literal attributes, e.g. the name of the movie)
    1. Now annotate your pages with object and data properties!
    2. Also, do not forget that the names of properties are defined in the ontology:

4. Conflicts? Discuss and rate

As we are editing the wiki as a group, some conflicts may appear. Loki offers two mechanisms to work with them:

  • possibility to rate each change (these rates may be further processed to identify which users are malicious; work in progress…)
  • possibility to discussion.

Both are created per wiki page, so there is a separate place for discussion for every wiki page, i.e. every movie, actor and so on.

  1. To enable the discussion and rater mechanisms for your page follow the steps described in Give it more power! section of revisionsrater plugin description.
  2. Now, discuss the Steven Spielberg page at talk page

5. Query the wiki

Wiki filled with knowledge may be processed. Loki supports two types of queries:

  • ASK (compatible with Semantic MediaWiki queries)
  • SPARQL (a subset of W3C standard for querying the RDF)

Let's now try this functionality:

  1. Observe the sample ASK queries on ask page
    • If you want to know more, read the manual section on ASK queries.
  2. Create some query on your page. E.g. try to list all movies in the wiki or think about some more sophisticated examples. Within the Demo instance there is a set of Loki use cases (see description), so you can also prepare queries using they.
  3. Also observe the sample SPARQL queries on sparql page and prepare your own SPARQL query.

6. Query the wiki from the web

SPARQL queries can be also asked through a special service called SPARQL endpoint. It is available at WIKI_ADDRESS/sparql/ address, i.e. for demo try:

  • The same SPARQL queries may be executed in SPARQL Endpoint as on the wiki pages. Try it now!
  • But SPARQL Endpoint also provides a possibility to remotely query the wiki using the HTTP GET method in a form of an URL: WIKI_ADDRESS/sparql/?query={HTTP_encoded_query}&format={html,json,xml} – as you can see, results can be obtained in json and xml formats that are easy to further automatic processing in your own software

7. Page semantics visualisation

Loki also offers a possibility to visualise the knowledge stored in a current page as a pretty graph.

Unfortunately, the visualisation plugin does not work with the current version of DokuWiki, so we will not use it now – come back later… :-(

8. XTT Viewer

Thanks to the modular architecture based on the DokuWiki plugins system, wiki can be easily extended to support the representations you are interested in.

Three such modules will be presented now. First of all, we have developed an XTT22) visualisation plugin. It shows the XTT2 decision trees within the wiki pages. You have to simply put the HMR specification of XTT2 model within the <hmr></hmr> tags.

To see how it works, see the page: xttviewer. If you have your own HMR files, you can also try to visualise them on the wiki page in the demo wiki.

Semantic Business Platform

Business Processes (BPMN)

The second module gives a possibility to manage BPMN processes description within the wiki using the simple BPMN notation. Try it now:

  1. Draw a simple process on a piece of paper. It should consist of about 3-4 blocks (events, activities) and 1-2 gateways.
  2. Follow the BPwiki tutorial available at bpwiki-tutorial to create your own BPMN process within the Demo wiki.
    • You can also take a look at Basic elements definition section of about page to observe some basic blocks and the simpleBPMN code for them.

Business Rules (SBVR)

The third plugin gives a possibility to represent SBVR3) dictionaries management within the wiki.

Try to create your own SBVR dictionary in the demo instance using the tutorial available at: sbvr-tutorial.

External RDF editor

As a final point, try our visual RDF editor! :-)

… or any other Loki installation if you have your own :-)
eXtended Tabular Trees version 2 notation is a way of representing decision tables trees developed at AGH University of Science and Technology
Semantics of Business Vocabulary and Business Rules

docs/tour.txt · Last modified: 2017/09/20 11:40 by kkutt