Open OrselChiang opened 1 month ago
I would use a SQWRL query to verify that the rule generates a result, e.g.,
PatientAssessment(?p) ^ ChestTightness(?e)-> sqwrl:select(?p, ?e)
The rule engine also has a method called getInferredOWLAxioms
that can be used to see what axioms were generated by the inference process.
I have written the following code to utilize the SWRLRuleEngine for executing a self-defined rule. When I output the ontology to a file and inspect it in Protege, I notice that only the rule is being recorded in the ontology, not the inferences. In contrast, when I execute the rule through the Protege plugin, the inferred results are correctly displayed.
I am puzzled by this discrepancy and would like to know what might be incorrect with my code.