Hi everyone,
I've been using owlready2 for some time now to try to get reasoning working with my ontology I made in Protege. Over time I've figured out little issues and solutions to them that are related to creating SWRL rules from loaded ontologies, and now I'm at the point of creating individuals/instances from those imported classes to try to perform reasoning with the SWRL rules.
I've noticed that the when I create an individual from the classes in my ontology, Pellet isn't creating the relation in the head from the rule on the individuals, but if I make a fresh ontology through owlready2, save it, load it back in the same way I would with my normal ontology and then apply the rule across it, it manages to create the relation on those individuals. Is there something specific that I may be missing or need to change on my normal ontology that owlready2's classes include with them?
The only thing I've noticed myself is that when I print out the IRI of the classes, the fresh ontology has "file:" at the beginning, but my normal ontology doesn't. I'm not sure if that's important...? and my ontology is several of them merged/imported together, so I have wondered if it's something specific about the IRIs.
I've already noticed that it works fine if I use individuals created from classes I defined in the code itself, but that does not solve the problem of me needing to use a loaded ontology.
Here is an idea of what my code is like:
https://pastebin.com/1sHAkAF2Edit: I've tested a little more and the only differences I can tell are: 1. My loaded classes don't seem to include their domains or ranges, and 2. My original class's "is_functional_for" property is different. I'm not sure if that affects anything.
Thank you in advance!
Daniel