|
Hi Jiba,
Thanks for all your help so far. I think I have found another potential bug, in the sync_reasoner_pellet function. I call the function in my code with the property and data flags both set to true, as my queries require inference over those fields. However when I do so, I found that superclasses do not get inferred into individuals. For instance, I have an individual called "Autumn" in my ontology, which is a feo:Season. After you run the reasoner, it gets characterized as a rdf:type of feo:SeasonCharacteristic (owlready does this properly). However, feo:SeasonCharateristic is a subclass of feo:SystemCharacteristic which is a subclass of feo:Charateristic. According to logical inference this means that feo:Season should also be a rdf:type of feo:SystemCharacteristic and feo:Characteristic, which is not happening with owlready. Running pellet on Protege does have this show these relationships. Reading the documentation, I thought that this was a feature supported by owlready. Please correct me if I am wrong or reach out if you have any questions. This is my code:
onto = World()
print("Loading Ontology")
onto.get_ontology(path).load()
print("Ontology Loaded")
print("Running Pellet")
sync_reasoner_pellet(onto, infer_property_values=True, infer_data_property_values=True)
print("Inferred File")
onto.save(file = "./infered_triples_1.rdf", format = "rdfxml")
|