User Tools

Site Tools


docs:tour

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:tour [2017/09/20 11:10]
kkutt [7. Page semantics visualisation]
docs:tour [2023/03/15 18:19] (current)
kkutt
Line 1: Line 1:
 +====== 1.5h Tour through our tools ======
 +
 +These instructions may be done in **[[https://loki.re/demo/|Loki demo]]**((... or any other Loki installation if you have your own :-) )). 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 ''https://loki.re/demo/doku.php/foo:bar'' 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 [[https://www.w3.org/TR/xmlschema11-2/#built-in-primitive-datatypes|other xsd types]])
 +    * relations between properties (e.g. subPropertyOf)
 +  * The default ontology is always available on the ''default'' page, e.g. in demo: https://loki.re/demo/doku.php/special:ontology:default
 +
 +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 [[#simple_wiki_page|1. Simple wiki page]] section!
 +
 +  - 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 ''<nowiki>https://loki.re/demo/doku.php/persons:quentin_tarantino</nowiki>'' page, this will the URI of the subject for all triples.
 +  - Firstly we can state the classes (categories) of the pages:
 +    - In RDF it looks like that: <code>https://loki.re/demo/doku.php/persons:quentin_tarantino   rdf:type   <actor>.</code>
 +    - The equivalent in the Loki is ''actor'' **category**.
 +    - **Based on the [[https://loki.re/wiki/docs:loki-tutorial#defining_categories|Defining categories section from Tutorial]], annotate your pages with the proper categories.**
 +    - 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 [[https://loki.re/demo/doku.php/special:ontology:default]] 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 :-) )
 +  - 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)
 +    - **Now annotate your pages with object and data properties!**
 +    - [[https://loki.re/wiki/docs:loki-tutorial#defining_relations|Defining relations (object properties)]] and [[https://loki.re/wiki/docs:loki-tutorial#defining_attributes|Defining attributes (data properties)]] sections from Loki tutorial may be useful.
 +    - Also, do not forget that the names of properties are defined in the ontology: [[https://loki.re/demo/doku.php/special:ontology:default]]
 +
 +==== 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.
 +
 +  - To enable the discussion and rater mechanisms for your page follow the steps described in [[https://loki.re/wiki/docs:revisionsrater#give_it_more_power|Give it more power!]] section of revisionsrater plugin description.
 +  - Now, discuss the [[https://loki.re/demo/doku.php/persons:steven_spielberg|Steven Spielberg page]] at [[https://loki.re/demo/doku.php/talk:persons:steven_spielberg|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:
 +  - Observe the sample ASK queries on [[tests:loki-queries:ask]] page
 +    * If you want to know more, read the manual section on [[https://loki.re/wiki/docs:userman#searching_interfaces|ASK queries]].
 +  - **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 ([[cases:start#loki|see description]]), so you can also prepare queries using they.
 +  - Also observe the sample SPARQL queries on [[tests:loki-queries:sparql]] page and **prepare your own SPARQL query**.
 +    * There is also a manual section on [[docs:userman#sparql_queries|SPARQL queries]] as well.
 +==== 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: https://loki.re/demo/sparql/
 +
 +  * 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 XTT2((eXtended Tabular Trees version 2 notation is a way of representing decision tables trees developed at AGH University of Science and Technology)) 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: [[docs: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:
 +  - Draw a simple process on a piece of paper. It should consist of about 3-4 blocks (events, activities) and 1-2 gateways.
 +  - Follow the BPwiki tutorial available at [[docs:bpwiki-tutorial]] to create your own BPMN process within the Demo wiki.
 +    * You can also take a look at [[docs:bpwiki-about#basic_element_definitions|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 SBVR((Semantics of Business Vocabulary and Business Rules)) dictionaries management within the wiki.
 +
 +Try to **create your own SBVR dictionary in the demo instance using the tutorial available at: [[docs:sbvr-tutorial]]**.
 +
 +===== External RDF editor =====
 +
 +As a final point, try our visual RDF editor! :-)
 +  * It is available here: [[https://loki.re/RDFeditor/]]
 +  * Documentation is available here: [[docs:rdfeditor]]
 +  * You can load one of the sample files placed in [[docs:rdfeditor#how_to_use|Parsers section]] or use the RDF/XML file generated by the Loki after pressing "RDF/XML Export" button on a page that contains some semantics.
 +