KRR-Oxford / DeepOnto

A package for ontology engineering with deep learning and language models.
https://krr-oxford.github.io/DeepOnto/
Apache License 2.0
187 stars 12 forks source link

Consistency checking #16

Closed Demirrr closed 10 months ago

Demirrr commented 10 months ago

Dear all,

thank you for DeepOnto.

I was wondering whether there is an example code for consistency checking, e.g.

from deeponto.onto import Ontology
onto = Ontology("path_to_ontology.owl", "hermit")
assert onto.consistent()
Lawhy commented 10 months ago

Hi @Demirrr, for checking the consistency of an ontology, you can use onto.reasoner.owl_reasoner.isConsistent() for now. owl_reasoner is an instance of OWLReasoner in the OWLAPI.

But I will make a check_consistency() method to encapsulate this feature latter.

Demirrr commented 10 months ago

Cheers!

Lawhy commented 10 months ago

Add feature at 4940b23.