OTTR templates Re: Toward easier RDF: a proposal

On 23/11/18 03:42, David Booth wrote:
> What I'd most like to see is a higher-level RDF language that 
> gets compiled into triples/quads, just as python gets compiled into byte 
> code, such that RDF users never need to actually see or deal with the 
> underlying triples.

While you wait for the easier RDF, please try out Reasonable Ontology 
Templates (OTTR). OTTR templates are like macros for RDF. They can be 
nested (a template can be built from other templates) and be 
instantiated. A template instance can be expanded to RDF triples. There 
are different serialisations, one in RDF. For example, the instance

[] ottr:templateRef <> ;
    ottr:withValues ( ex:Margherita ex:Italy ( ex:Mozzarella ex:Tomato )) .

expands to

ex:Margherita rdf:type owl:Class ;
    rdfs:subClassOf p:NamedPizza ,
       [ rdf:type owl:Restriction ;
         owl:onProperty p:hasTopping ;
         owl:someValuesFrom ex:Mozzarella
       ] ,
       [ rdf:type owl:Restriction ;
         owl:onProperty p:hasTopping ;
         owl:someValuesFrom ex:Tomato
       ] ,
       [ rdf:type owl:Restriction ;
         owl:onProperty p:hasTopping ;
         owl:allValuesFrom [
   rdf:type owl:Class ;
           owl:unionOf ( ex:Mozzarella ex:Tomato )
       ] ,
       [ rdf:type owl:Restriction ;
         owl:onProperty p:hasCountryOfOrigin ;
         owl:hasValue ex:Italy
       ] .

with the NamedPizza template defined as seen here:

For more information please check out:

  - OTTR homepage:
  - Preliminary template library:
  - ISWC demo:
  - Papers:

The current implementation is a proof of concept. Updated specifications 
and implementation will be released in the coming months.


Received on Friday, 23 November 2018 08:46:45 UTC