- From: Martin G. Skjæveland <martige@ifi.uio.no>
- Date: Tue, 5 Nov 2019 20:31:43 +0100
- To: "Cox, Simon (L&W, Clayton)" <Simon.Cox@csiro.au>, Chris Mungall <cjmungall@lbl.gov>, Dan Brickley <danbri@danbri.org>
- Cc: Simon Steyskal <simon.steyskal@gmail.com>, Martynas Jusevičius <martynas@atomgraph.com>, Semantic Web <semantic-web@w3.org>
As already pointed out in this thread, SHACL and ShEX, as constraint languages, do not support /generating/ patterns, "only" describing them. SPIN on the other hand is a more generic language that as a rule language also supports generating patterns. OTTR has a more narrow focus than SPIN, aiming to be language for representing reusable modelling patterns for RDF and OWL. These templates are intended to be made available in libraries of interconnected templates. OTTR templates are compositional in design, meaning a template is defined based on other templates -- "it's templates all the way down". A template instance is "transformed" to RDF by recursively expanding the instance to instances of the /base template/ ottr:Triple, which represents an RDF triple. The relative simple structure of OTTR templates permits automatic analysis of template libraries to discover possibly unwanted redundancies like overlap or containment between templates. Other possibly distinguishing features of OTTR are a custom-built type system that is used to type check template definitions and instances and can for instance be used to disallow punning, and list arguments to support variable length arguments. This is an example of an OTTR template representing a pattern implicitly used in the Pizza ontology: ex:NamedPizza [ owl:Class ?pizza, ? owl:NamedIndividual ?country, NEList<ottr:IRI> ?toppings] :: { ax:SubClassOf(?pizza, ex:NamedPizza), ax:SubObjectHasValue(?pizza, ex:hasCountryOfOrigin, ?country), ax:SubObjectAllValuesFrom(?pizza, ex:hasTopping, _:toppingsUnion), rstr:ObjectUnionOf(_:toppingsUnion, ?toppings), cross | ax:SubObjectSomeValuesFrom(?pizza, ex:hasTopping, ++?toppings) } . and these are two instances of the template: ex:NamedPizza(ex:Margherita, ex:Italy, (ex:Mozzarella, ex:Tomato)) . ex:NamedPizza(ex:Hawaii, none, (ex:Cheese, ex:Ham, ex:Pineapple)) . These are found in the interactive examples on http://ottr.xyz. Click "Run" to see their expansion. OTTR at its core does not support manipulating terms, e.g., concatenating two strings to form a URI. While this is of course a necessary feature, we believe it should not be part of the *modelling pattern* as this makes the pattern description in many cases too specific to the input data. Data cleansing and preparation we believe should be placed outside the template. (To support data ingestion, we have introduced a simple mapping language that translates query answers to OTTR template instances --- allowing for data preparation in the query over the sources, see http://spec.ottr.xyz/pOTTR/0.1/04-etl-bottr.html.) We believe that the design of OTTR makes these templates easy to use and maintain, but we have yet to evaluate this. Our belief is that OTTR templates are well suited especially for large scale/long term ontology development as the availability of a well managed library of reusable and instantiable modelling patterns will pay off in the long run. An initial library of basic patterns are available, and maintenance procedures for template libraries are in development. Martin On 05/11/2019 06:47, Cox, Simon (L&W, Clayton) wrote: > SPIN had the advantage that it supported SPARQL CONSTRUCT. > > This is still hinted at in SHCAL but I haven’t found it implemented. > > *From:* Chris Mungall <cjmungall@lbl.gov> > *Sent:* Tuesday, 5 November, 2019 12:25 > *To:* Dan Brickley <danbri@danbri.org> > *Cc:* Simon Steyskal <simon.steyskal@gmail.com>; Martin G. Skjæveland > <martige@ifi.uio.no>; Martynas Jusevičius <martynas@atomgraph.com>; > Semantic Web <semantic-web@w3.org> > *Subject:* Re: [ANN] OTTR: RDF/OWL modelling framework release, ISWC > tutorial > > AFAIK shape languages can't be used in a generative capacity. OTTR seems > more in the family of templating languages such as OPPL[1], ROBOT > templates[2], or Dead Simple OWL Design Paterns[3] > > [1] https://github.com/owlcs/OPPL2 > > [2] http://robot.obolibrary.org/template R.C. Jackson, J.P. Balhoff, E. > Douglass, N.L. Harris, C.J. Mungall, and J.A. Overton. ROBOT: A tool for > automating ontology workflows. BMC Bioinformatics, vol. 20, July 2019. > https://link.springer.com/epdf/10.1186/s12859-019-3002-3 > > [3] Dead Simple OWL Design Patterns David Osumi-Sutherland, Melanie > Courtot, James P. Balhoff and Christopher Mungall Journal of Biomedical > Semantics 2017 8:18 DOI:10.1186/s13326-017-0126-0 > https://jbiomedsem.biomedcentral.com/articles/10.1186/s13326-017-0126-0 > > On Fri, Nov 1, 2019 at 1:45 AM Dan Brickley <danbri@danbri.org > <mailto:danbri@danbri.org>> wrote: > > Or, for that matter, ShEx? > > https://shex.io/ > > A good comparison could help clarify the entire design space. > > (academics looking for good semweb topics for students, please take > note!) > > On Fri, 1 Nov 2019 at 05:59, Simon Steyskal > <simon.steyskal@gmail.com <mailto:simon.steyskal@gmail.com>> wrote: > > or SHACL? > > https://www.w3.org/TR/shacl/#sparql-constraint-components > > https://www.w3.org/TR/shacl-af/ > > - simon > > On Fri, 25 Oct 2019, 09:09 Martynas Jusevičius, > <martynas@atomgraph.com <mailto:martynas@atomgraph.com>> wrote: > > Hi Martin, > > how does OTTR compare to SPIN templates? > https://spinrdf.org/spin.html#spin-templates > > > Martynas > > On Fri, Oct 25, 2019 at 5:02 AM Martin G. Skjæveland > <martige@ifi.uio.no <mailto:martige@ifi.uio.no>> wrote: > > > > Hi all, > > > > Lutra, the open source reference implementation of OTTR > templates, is > > now available in release version 0.6. > > > > OTTR (Reasonable Ontology Templates) allows RDF/OWL > modelling patterns > > to be precisely defined and instantiated and support > desirable modelling > > principles such as > > > > - layered abstractions > > - encapsulating complexity > > - uniform modelling > > - DRY don't repeat yourself > > - separation of design and content > > > > Lutra and OTTR supports many convenient language constructs: > > - nested template definitions > > - typing system adapted to RDF and OWL > > - optional arguments > > - list arguments > > and support bulk loading data from spreadsheets and > databases. > > > > To see and learn what this means, visit the project page: > > http://ottr.xyz and the primer > http://spec.ottr.xyz/pOTTR/0.1/ > > containing many interactive examples. > > > > If you are attending ISWC 2019, please come to our > tutorial "Scalable > > construction of sustainable knowledge bases" tomorrow, > Saturday October > > 26: http://ottr.xyz/event/2019-10-267-iswc/ > > > > On behalf of the OTTR team, > > Martin > > >
Received on Tuesday, 5 November 2019 19:32:01 UTC