pwin / owlready2

GNU Lesser General Public License v3.0
132 stars 22 forks source link

Issue with SWRL Rules and Data Property Inference #44

Open PG-9-9 opened 11 months ago

PG-9-9 commented 11 months ago

Context:

I have an ontology (.owl file) to which I added SWRL rules using the SWRL Plugin in the Protege editor. I have two queries:

  1. Can the data property within the ontology be inferred without the Pellet reasoner? Currently, the data property is not accessible by owl2ready.

  2. Is there a built-in function or way to access SWRL rules in the ontology?

andredemori commented 11 months ago

I'm facing the same issue. I'm trying to run the Pellet reasoner in OwlReady2 to generate inferences produced by SWRL rules defined in my OWL file with DLSafeRules. However, the inferences are not being generated as they are in Protegé. Is it possible to do this with OwlReady2?

andredemori commented 11 months ago

I solved using RDF/XML format. The inference worked. See documentation:

https://owlready2.readthedocs.io/en/v0.42/rule.html

PG-9-9 commented 11 months ago

I am using the SWRL rules in RDF/XML format, still no luck

Hannah-Doerpholz commented 10 months ago

As far as I know, datatype properties are not usually inferred like classes or object properties are. The same goes for annotation properties. If the information from datatype properties is crucial for your analysis it might be worth it to model it as classes instead so that the reasoners can work with it easily