Semantic Wiki Syntax

User Documentation

  • You can use URIs directly in triples, therefor you have to write the URI between this < > pair of brackets. (Of course, Paul and Paula have to be defined semantic keywords.)
     Paul <> Paula.
  • You can define semantic keywords through the predicates isPredicateURIOf and isSubjectURIOf, for example:
    <> isPredicateURIOf knows.
    <> isSubjectURIOf Person.
    <> isSubjectURIOf Paul.
    <> isSubjectURIOf Paula.
    <> isSubjectURIOf Julia.
    <> isSubjectURIOf Kaiserslautern.
  • Each statement has to occur in a separate line.
  • To use this defined semantic keywords you only have to use them in your text and end a finished triple with a dot. It may appear at any position on the page. For example:
    Paul knows Paula. 
    Julia knows Paul, Paula. Paula, Paul knows Julia.
    Julia, Paula <> Kaiserslautern.
    <> isPredicateURIOf livesIn.
    Paul livesIn Kaiserslautern ; knows Julia.  
  • NOTE: The parser will be more pedantic about definitions, so:
    • write only ONE definition per line
    • insert exactly ONE SPACE (from the space key) between subject, predicate and object
    • END every line with a DOT.
    • these issues will be solved in ticket:41
  • The RDF formulated can be downloaded using the ViewRDF.jsp and DownloadRDF.jsp pages, accessable through a link on the bottom of the page (at least in the kaukolu design template)
  • Note that any ontologies imported by the RdfsImporter can be edited, too!

Developer Documentation

The parser is de.opendfki.kaukoluwiki.tripleParser.WikiTripleParserHandler. Other classes of interest are

JavaCC may generate (some of) these classes. See build_javacc.xml.

Design Thoughts


  • ...taken from Leo's wishlist
    • Differentiate between semantic keywords and wiki links (1)
    • Make semantic keywords clickable (2)
    • Comprehensible semantic parsing/parsing explanation (3)
    • Create as much RDF/links as possible (4)

Malte's Ideas

  • Extend autocompletion to a proposal wizard that can be invoked in any context. Example: User types "Pau", CTRL-Space. Suggestions: "Paula/Keyword", "Paul/Wiki page". Depending on the choice, either "[[Paula]]" or "[Paul]" gets inserted. (1)
  • Extend the page-to-HTML renderer to support annotations and the triple parser to create RDF triples as annotations for wiki markup. (2), (3)

Leo's Wishlist

Leo would like to use brackets around the keywords also, so that users can have control over when they use the autocompletion feature and that they make conscious decisions when to use semantic keywords or wiki pages (1). This allows to render the words with links in HTML (2). Also, when using autocompletion, the instruction for users is: you enter a opening bracket, then press strg-space. Thats easy to remember. Alternatively, we could start the autocompletion after a timeout. The bracket could help triggering the parser, the autocompletion and the links in the rendered html. For users, this also helps finding problems; when a user types a Semantic keyword wrong, there is no feedback (3), but when a word in brackets is wrong-typed, it gets the "create new page" link, showing there is a problem. So, for resources and for predicates, I would prefer to use a markup around it, like here:

[Paul] [knows] [Paula].

The parser should also create links for as much elements as possible (4). Any identiyable element that is mentioned, Semantic Keywords, WikiPages, URIs or HTTP links using the link syntax, should be treated as URIS. For example, copying and writing about URIs posted to the wiki is a common requirement. Also, we may thing about allowing the ";" separator to add more about the same subject. I may want to say things like:

[DFKI] [isa] [Company]; and their [homepage] is [DFKI Homepage|] .

Or I just write a list of links I need from this page, to dfki we have the following relations:
* []
* []

The mentioned links (, etc) should be noticed by the parser and related with something like a generic "related" link, so that we can build applications that show messages like: "the website you are currently browsing is mentioned on this wikipage:X". This resembles the previous requirement:

  • Things that cannot be put into triples (because the sentence structure is weird or the property/predicate is missing) are put into a default relation to the page containing them. Example: 'And then blub sais (Nosferatu).' is transfered to <page> <relatedto> <Nosferatu>.

Some more points:

  • the parser should not be pendantic:
    • You can write more than ONE definition per line. -- this is useful to write down text quickly
    • insert any amount of spaces or text between subject, predicate and object -- if the parser is so pendantic, user's don'T know why their content is not parsed
  • newlines and dots . do start new sentences, so newlines and dots do start new triples. -- sometimes we use ?!. as end lines, or use bullet lists (*) as lines, so having the newline as separator additional to the normal ones (?!.).
  • Things in hyphens are Literals "a literal".

Example for these rules:

In Sachen [SemDeskPraktikum2005] haben sich Leute angemeldet die [nehmenTeil] sind [FlorianMittag], [RalfBiedert];
weiteres ist das [datum] der "2005-11-14".

is stripped down to the most important terms:

[SemDeskPraktikum2005] [nehmenTeil] [FlorianMittag], [RalfBiedert];
  [datum] "2005-11-14". 

and then upgraded to be N3 (note that this is real N3 that parses and validates):

@prefix leowiki:     <> .
leowiki:SemDeskPraktikum2005 leowiki:nehmenTeil leowiki:FlorianMittag, leowiki:RalfBiedert;
  leowiki:datum "2005-11-14". 

which is equivalent to these triples (N-TRIPLES):

<> <> <>. 
<> <> <>.
<> <> "2005-11-14". 

This results to these triples, that have to be stored in the RDF database, as created by the wiki page on which they were entered.

Note by Malte: A naive transformation chain such as this would not allow us to link the generated RDF to the text (fragments) it has been generated from.

Last modified 10 years ago Last modified on 10/11/06 16:37:30