Hello!
Start here!
Demo installation(currently closed due to spam bots)
Download
Loki Semantic Wiki
BiFröST Framework
- About BiFröST (in progress…)
- Plugins:
IMPORTANT:
This code should be placed on every page using PlWiki plugin:
~~NOCACHE~~
The simplest use case. Without cache. Only process knowledge between “pl” tags.
<pl goal="woman(X),write(X),nl,fail"> woman(kate). man(john). </pl>
Result:
kate
More interesting use case: adding knowledge to the page:
<pl cache="true"> man(jack). man(jim). </pl>
Now when we have prolog code associated with DokuWiki page, we can “query” selected scope or Wiki page. Scope accepts POSIX Regular Expressions.
<pl goal="man(X),write(X),nl,fail" scope="docs:plwiki1ex" > % % Prolog code may be placed here but it is not necessairly. % </pl>
Result:
jack
jim
Loki plugin also contains loki.pl prolog script, which allows to query knowledge gathered in Loki from Prolog.
We can list all predicates in selected scope:
<pl goal="consult('lib/plugins/loki/loki.pl'),wikiconsult('docs/plwiki1api'),list."></pl>
Result:
'$member'
'$pack':pack_dir
->atomic_list_concat
;atomic_list_concat
atom_concat
current_prolog_flag
file_search_path
library_directory
man
pcehome_
prolog_file_type
system:'$xdg_prolog_directory'
system:current_prolog_flag
wiki_header
wiki_internallink
woman
We can also list informations about selected predicate.
<pl goal="consult('lib/plugins/loki/loki.pl'),wikiconsult('docs/plwiki1api'),list(man)."></pl>
Result:
man(john).
man(jack).
man(jim).
Semantic MediaWiki syntax is also supported, there are some methods of semantic annotation:
[[category:category1]]
[[capital of::countries:poland]]
[[created:=April 22 2009]]
{{#ask: [[category:cities]] [[capital_of::countries:poland]]}}