How can I retrieve for each class in my ontology O all (inferred) existential restrictions?
My current approach is to iterate over all pairs of classes and object properties, and check if the restriction is satisfied:
- for each subclass (C, D) in Classes(O) × Classes(O):
- for each property P defined in Object properties(O):
- if C and P some D is satisfiable:
- yield (C, P, D)
This is pretty slow as I am working with the vaccine ontology which has 4557 classes and 107 object properties. Even it is a one-time computation, I may learn something from seeing better approaches.
Using the OWLKnowledgeExplorerReasoner
from JFact as suggested here did not work because it crashed when retrieving the neighbour labels (see my test case)
Can you suggest any improved solution using OWLAPI, Protégé or any other tool? Also, it would be nice to only retrieve the most specific filler classes.
Thanks!