Reasoning : can't find inferred properties

Hello

I am new to Stardog
I was able to upload an ontology and execute queries.
I tried to test reasoning results and compare the results to Protégé reasoner.
In Protégé, I can see the inferred properties, but not in stardog.

Here is my query in stardog :
stardog query --reasoning myDB “select * where {:action ?p ?o}”
(I am looking for inferred properties on action)

Thank you

Saad

Hi Saad,

Welcome to the Stardog community. Your question is clear, but we will need more information to figure out why there are no results for your query.

Can you please share:

  • Triples in the database
  • Axioms in your ontology
  • Expected results from query

Thanks,
Jess

Hello Jess

Thank you for answering back.
I uploaded here a simplified version of my ontology structure.
When I upload the triples in Protégé and run the reasoner, I can see inferred properties under "Patient" class instance (here, the inferred property is "person_medicated")
I run the same steps through Stardog (upload the triples and query the instance properties) but I don't have the expected inferred property.

Thanks

Saad

onto_test2.rdf (8.4 KB)
onto_test2.rdf (8.4 KB)

Here is an extract of the log file stardog.log
WARN 2018-08-07 16:03:20,990 [stardog-user-4] com.clarkparsia.blackout.ProfileFilterBase:apply(39): Not a valid SL axiom: EquivalentClasses(www:person_medicated, and(www:person, or(some(www:PatientTakesMedication,www:drug_k), some(www:PatientTakesMedication,www:other_drugs))))

So I might need to change the axiom from SL to DL

is there anyway to do it in the command line ?

Thanks

No, you need to change the database option as explained here: Home | Stardog Documentation Latest

Changing to DL will work but is not a good move in general (see the above link). The major problem in this axiom is the disjunction. You might be able to get required inferences if you weaken your axiom into

SubClassOf(and(www:person, some(www:PatientTakesMedication,www:drug_k)), www:person_medicated)

and

SubClassOf(and(www:person, some(www:PatientTakesMedication,www:other_drugs)), www:person_medicated)

This is in SL (in fact, in OWL EL) and should be more scalable.

Your query select * where {:action ?p ?o} is also problematic because the predicate variable is not bound. Such queries, although supported by Stardog, are disallowed in the OWL Entailment Regimes spec because there's no efficient evaluation procedure for them (strictly speaking, they are not first-order conjunctive queries). You may want to execute a series of more specific queries instead, each for a specific property.

Best,
Pavel

PS. Comparing results to Protege makes sense to verify correctness but you should always keep in mind that there's a substantial difference between working with a (in-memory) reasoner and a database. The latter by design has to deal with much tougher scalability challenges so some expressivity compromises are inevitable.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.