Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid explanations with owlapi #61

Open
RukNdf opened this issue May 6, 2021 · 3 comments
Open

invalid explanations with owlapi #61

RukNdf opened this issue May 6, 2021 · 3 comments

Comments

@RukNdf
Copy link

RukNdf commented May 6, 2021

I'm using Openllet 2.6.5 with owlapi 5.1.16 to generate explanations for assertions and it works for the most part, but there's often invalid rules within the explanations. Asking the program to explain why "prop a b" is true might lead to an explanation that includes the contradicting rule "... -> not-prop a b", but is otherwise correct.
Using Protege with the pellet reasoner leads to correct explanations without those contradicting rules, so it most likely isn't a problem with the ontology itself.

The openllet reasoner is initialized via

//OwlOntoLayer onto
final OpenlletReasoner reasoner = OpenlletReasonerFactory.getInstance().createReasoner(this.onto.getOntology());
expGen = new PelletExplanation(reasoner);

and the explanation obtained with

OWLDataFactory dataFactory = this.ontology.getOWLOntologyManager().getOWLDataFactory();
OWLObjectPropertyAssertionAxiom propertyAssertion = dataFactory.getOWLObjectPropertyAssertionAxiom((OWLObjectPropertyExpression)objectProperty, (OWLIndividual)domain, (OWLIndividual)range);
System.out.println(expGen.getEntailmentExplanation((OWLAxiom)propertyAssertion));

The code seems to be correct when compared with the examples, all other variables output the expected value when you print them, and aside from the inconsistent rule the explanation is correct, which makes me believe it's not a problem with the code either.

I can't share the ontology I'm currently using, but if you think there might be a problem with it I can try recreating the problem with another ontology.

@Galigator
Copy link
Owner

Is the 'prop' reflexive ?

@RukNdf
Copy link
Author

RukNdf commented May 7, 2021

No, none of the proprieties have any characteristics.

@RukNdf
Copy link
Author

RukNdf commented Jul 26, 2021

Turns out the ontology I'm using was already public in another repository, here's the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants