mowl.reasoning

class mowl.reasoning.base.MOWLReasoner(reasoner)[source]

Bases: object

This class encapsulates some of the funcionalities in the OWLAPI. It provies methods to infer different types of axioms to extend a particular ontology.

Parameters:

reasoner (This parameter has to implement the OWLAPI interface org.semanticweb.owlapi.reasoner.OWLReasoner) – Reasoner that will be used to infer the axioms.

infer_subclass_axioms(owl_classes, direct=False)[source]

Infers and returns axioms of the type \(C \sqsubseteq D\)

Parameters:
  • owl_classes – List of OWLClass objects to be used to infer the axioms.

  • direct (bool, optional) – If True, only direct superclasses will be inferred. Default is False.

Return type:

list[org.semanticweb.owlapi.model.OWLSubClassOfAxiom]

infer_equivalent_class_axioms(owl_classes)[source]

Infers and returns axioms of the form \(C \equiv D\)

Parameters:

owl_classes – List of OWLClass objects to be used to infer the axioms.

Return type:

list[org.semanticweb.owlapi.model.OWLEquivalentClassesAxiom]

infer_disjoint_class_axioms(owl_classes)[source]

Infers and adds axioms of the type \(C\) disjoint_with \(D\)

Parameters:

owl_classes – List of OWLClass objects to be used to infer the axioms.

Return type:

list[org.semanticweb.owlapi.model.OWLDisjointClassesAxiom]