balhoff / arachne

RDF rule engine
BSD 3-Clause "New" or "Revised" License
21 stars 6 forks source link

Provide configurations for reasoning with TBoxes as ABoxes #12

Open cmungall opened 5 years ago

cmungall commented 5 years ago

Context: @deepakunni3 is building an uber kg for translator. We just want to use simple edges for existentials. See https://douroucouli.wordpress.com/2019/07/11/proposed-strategy-for-semantics-in-rdf-and-property-graphs/

We want to propagate properties down is-a hierarchies @realmarcin will take results and analyze as matrix

Here we want to ignore the OWL translation rules and instead just have rules like

?c owl:subClassOf ?d .
?d ?r ?y .
?r a owl:ObjectProperty .
==>
?c ?r ?y .

possibly also annotating triples with inference provenance.

Can we have these rules stored in this repo, and have an option to use these rather than owl ones?

balhoff commented 5 years ago

Do you need another rule to turn restrictions into triples?

?d owl:onProperty ?r .
?d owl:someValuesFrom ?e .
==>
?d ?r ?e .
balhoff commented 5 years ago

@cmungall @deepakunni3 by the way you can do this already via the command line. The OWL-to-rules translation is only applied to an ontology passed via the --ontology option. You can alternatively, or in addition, directly provide rules using the --rules option. The rules are in Jena syntax; however only triple patterns are supported (not other constraints supported by Jena).

Make a rule file myrules.txt like this:

[ (?c owl:subClassOf ?d), (?d ?r ?y), (?r rdf:type owl:ObjectProperty) -> (?c ?r ?y) ]
[ (?d owl:onProperty ?r), (?d owl:someValuesFrom ?e) -> (?d ?r ?e) ]

Then you can run like this:

arachne --rules=myrules.txt --data=myontology.ttl --export=inferred.ttl