Implement OTTR in a semantic technology language

The thesis will investigates if and how expansion of OTTR templates can be implemented in languages from semantic technologies, such as SPARQL, SHACL-rules, SWRL-rules, Jena-rules, or similar.

OTTR is a macro language over knowledge bases defined in terms of templates. A template is either a base template denoting a foundational statement (such as the RDF triple), or has a definition if the form of a pattern consisting of a set of instances of other templates. One base template in our standard library of templates denotes an RDF triple. Using only this template as base template, OTTR templates can then be viewed as mappings from tabular data into triple graphs (such as RDF).

For example, the following template defines a person, with a name, and two biological parents:

ex:Person[ ?person ottr:IRI, ?name xsd:string, ?mother ottr:IRI, ?father ottr:IRI ] :: {
  ottr:Triple(?person, rdf:type, ex-o:Person),
  ottr:Triple(?person, ex-o:hasName, ?name),
  ottr:Triple(?person, ex-o:hasMother, ?mother),
  ottr:Triple(?person, ex-o:hasFather, ?father)
} .

An instance of this template, e.g. ex:Person(:Per, "Per", :Kari, :Ola) can then be expanded to:

:Per rdf:type ex-o:Person ;
    ex-o:hasName "Per";
    ex-o:harMother, :Kari ;
    ex-o:harFather, :Ola .

Note that templates can "call" other templates, thus we can have deeply nested templates, just like a Java-method can call other Java-methods. For more information and examples on OTTR, see the OTTR-webpage.

Currently, this expansion is implemented in a Java-program called Lutra. The thesis investigates whether this recursive macro expansion of OTTR can be implemented directly in a language already available in triplestores, such as SPARQL, Jena Rules, SHACL-rules, or similar languages. This topic is language and technology focused, and fits for students interested in expressiveness of different (declarative) languages. Topics that can be investigated as part of this thesis are:

  • If it is possible to implement expansion using one of these languages, create such an implementation and test how it performs wrt. the current implementation (Lutra)
  • If this is not possible, why is it impossible? Is there a sublanguage of OTTR that can be implemented?
  • How do the different languages compare in expressiveness wrt. this problem?
Publisert 27. sep. 2023 16:44 - Sist endret 27. sep. 2023 16:44

Veileder(e)

Omfang (studiepoeng)

60