How to disinguish between inferred and explicit axiom?

160 views Asked by At

I have one basic question concerning working with OWL API and reasoners.

I have tried JFact Reasoner, successfully ran it and got a lot of axioms (some of them inferred, some of them explicitly stated in the original ontology).

I need to distinguish between them, but I really can't find any method for doing it.

Is there any method in OWLClass or somewhere else?

1

There are 1 answers

2
Ignazio On BEST ANSWER

Asserted axioms differ from inferred only because they are explicitly present in the ontology.

You can check if an axiom is present in an ontology this way:

OWLOntology o = ...
OWLAxiom ax = ...
boolean asserted = o.containsAxiom(ax);

Note: if an axiom has annotations, it is possible that it will not be matched by theis method: axioms that are semantically equivalent but have different annotations are not equals() to each other (This is W3C specs, not an OWL API decision). In that case, you can find if an axiom is asserted with o.containsAxiomIgnoreAnnotations(ax).