2

I created an rdflib graph and serialised it into an owl file formatted as XML. I explicitly write A RDF.type RDFS.Class and B RDFS.subClassOf A. After I do this.

    onto = owlready2.get_ontology("file://D:/Uni/cs/courses/bdrp/bdrp_sch_kb/code/test1.owl").load()
    owlready2.sync_reasoner()
    onto.save("test2.owl", format='rdfxml')

But when I open the test2.owl, there is no B RDF.type RDFS.Class. So, B's type was not inferred. Does owlready2 reasoner even work?

logi-kal
  • 7,107
  • 6
  • 31
  • 43
lamename
  • 31
  • 2
  • 2
    the reasoner works. The inference itself is not something an OWL reasoner does cover. You're mixing RDFS inference with OWL inference, OWL != RDFS . I also don'T see the benefit of what you did. In OWL classes are of type `owl:Class` and it also holds that every `owl:Class` is subclass of `rdfs:Class``- what you did is basically useless - so what is the use case of your inference? Just create OWL classes and you're done – UninformedUser Feb 22 '21 at 06:56
  • Yes, but OWL inference includes RDFS:inferences, doesn’t it? – lamename Feb 22 '21 at 09:57
  • Yes, I replace rdfs:Class with Owl:Class and it still doesn't infer – lamename Feb 22 '21 at 10:05
  • infer what? This is a trivial axiom, see https://www.w3.org/2002/07/owl# - there is no need for inference – UninformedUser Feb 22 '21 at 11:15
  • It doesn’t see the subclassof Owl:Class as Owl:class. When I assert B is an Owl:Class and A is subclassof B and run graph.subjects(rdf.type, Owl:Class) it doesn’t return A but only B – lamename Feb 22 '21 at 11:32

0 Answers0