Re: OWL and RDF lists

On 8/11/22 08:26, Eric Prud'hommeaux wrote:
> RDF lists (technically "collections" ¹) have terse abbreviations in
> Turtle/SPARQL and a "ladder" representation as triples.
> 
> <https://en.wikipedia.org/wiki/Flag_of_France> :orderedColors _:1 .
> _:1 rdf:first "blue" .
> _:1 rdf:rest _:2 .
> _:2 rdf:first "white" .
> _:2 rdf:rest _:3 .
> _:3 rdf:first "red" .
> _:3 rdf:rest rdf:nil .
> 
> The SPARQL 1.2 WG is wrestling with lists ², and JSON-LD 1.1 has added
> support for them ³. OWL however, specifically disables them by
> prohibiting inferences across predicates in the rdf: namespace à la
> Jim Balhoff's example ⁴;
> [[
> :contains rdf:type owl:ObjectProperty ;
>    owl:propertyChainAxiom ( rdf:rest :contains ) .
> ]]

To put it bluntly, we face an unpleasant choice: we can either use RDF 
lists, which are nicer for humans to read and write in Turtle, or we can 
be OWL friendly, but not both.  If we use RDF lists then OWL users will 
need to employ a workaround to transform the data prior to OWL reasoning.

> 
> FHIR is a set of models for clinical record. It has representations in
> XML, JSON and RDF. There's a playground ⁵ to explore alternatives
> which illustrates alternatives, including whether to use
> rdf:Collections (see button at top-right). With collections turned
> off, we have to roll our own order (fhir:index 0, 1, 2...), which
> kinda goes against RDF standards.
> 
> I put together a gist which illustrates three observations we might
> encounter in a patient's record. The codes for the first two appear in
> a SNOMED hieararchy you might query for evidence of bone density loss
> (clinical example, balancing corticosteroids against osteoporosis).
> 
> https://fhircat.github.io/fhir-rdf-playground/?axes=rdvCh&manifestURL=https://gist.githubusercontent.com/ericprud/8e53eef196ccdc2c43f40238fdd06691/raw/224261f5055a3980acd79570fe5caeaf4a4b2d84/osteo-manifest.json

Note to readers that if you try out that example, you also need to click 
on the "Turtle" tab above the bottom pane, to see the results in Turtle.

Thanks,
David Booth

> 
> 
> Solbrig et al demonstrate how the SNOMED hierarchy can be used for
> valuable clinical insights ⁶ *iff* we can work write OWL axioms which
> simultaneously access the SNOEMD hierarchy and the codes in the
> paitent data. But as Jim demonstrated, that requires OWL axioms that
> reference the forbidden rdf: namespace.
> 
> Thoughts? Advice?
> 
> 
> ¹ https://www.w3.org/TR/rdf-primer/#collections
> ² https://github.com/w3c/sparql-12/issues/46
> ³ https://www.w3.org/TR/json-ld11/#example-82-specifying-that-a-collection-is-ordered-in-the-context
> ⁴ https://gist.github.com/balhoff/62fb8f2c1e29bc0d4d27c3df0d005154
> ⁵ https://fhircat.github.io/fhir-rdf-playground/
> ⁶ https://github.com/BD2KOnFHIR/BLENDINGFHIRandRDF
> 

Received on Thursday, 11 August 2022 17:49:36 UTC