ontolearn.base.plus

OWL Reasoner Plus.

Module Contents

Classes

OWLReasoner_Owlready2_Plus

OWL Reasoner based on owlready2.

class ontolearn.base.plus.OWLReasoner_Owlready2_Plus(ontology: OWLOntology_Owlready2, isolate: bool = False)[source]

Bases: ontolearn.base.OWLReasoner_Owlready2

OWL Reasoner based on owlready2.

Contains some behavioural fixes.

sub_classes(ce: owlapy.class_expression.OWLClassExpression, direct: bool = False, only_named: bool = True) Iterable[owlapy.class_expression.OWLClass][source]

Gets the set of named classes that are the strict (potentially direct) subclasses of the specified class expression with respect to the reasoner axioms.

Parameters:
  • ce – The class expression whose strict (direct) subclasses are to be retrieved.

  • direct – Specifies if the direct subclasses should be retrieved (True) or if the all subclasses (descendant) classes should be retrieved (False).

  • only_named – Whether to only retrieve named sub-classes or also complex class expressions.

Returns:

If direct is True, each class C where reasoner axioms entails DirectSubClassOf(C, ce). If direct is False, each class C where reasoner axioms entails StrictSubClassOf(C, ce). If ce is equivalent to owl:Nothing then nothing will be returned.

sub_object_properties(op: owlapy.owl_property.OWLObjectPropertyExpression, direct: bool = False) Iterable[owlapy.owl_property.OWLObjectPropertyExpression][source]

Gets the stream of simplified object property expressions that are the strict (potentially direct) subproperties of the specified object property expression with respect to the imports closure of the root ontology.

Parameters:
  • op – The object property expression whose strict (direct) subproperties are to be retrieved.

  • direct – Specifies if the direct subproperties should be retrieved (True) or if the all subproperties (descendants) should be retrieved (False).

Returns:

If direct is True, simplified object property expressions, such that for each simplified object property expression, P, the set of reasoner axioms entails DirectSubObjectPropertyOf(P, pe). If direct is False, simplified object property expressions, such that for each simplified object property expression, P, the set of reasoner axioms entails StrictSubObjectPropertyOf(P, pe). If pe is equivalent to owl:bottomObjectProperty then nothing will be returned.