:py:mod:`ontolearn.base.ext` ============================ .. py:module:: ontolearn.base.ext .. autoapi-nested-parse:: Extra classes. Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: ontolearn.base.ext.OWLReasonerEx Attributes ~~~~~~~~~~ .. autoapisummary:: ontolearn.base.ext.logger .. py:data:: logger .. py:class:: OWLReasonerEx(ontology: owlapy.owl_ontology.OWLOntology) Bases: :py:obj:`owlapy.owl_reasoner.OWLReasoner` Extra convenience methods for OWL Reasoners (Not part of OWLAPI) .. py:method:: data_property_ranges(pe: owlapy.owl_property.OWLDataProperty, direct: bool = False) -> Iterable[owlapy.owl_data_ranges.OWLDataRange] Gets the data ranges that are the direct or indirect ranges of this property with respect to the imports closure of the root ontology. :param pe: The property expression whose ranges are to be retrieved. :param direct: Specifies if the direct ranges should be retrieved (True), or if all ranges should be retrieved (False). Returns: .. py:method:: all_data_property_values(pe: owlapy.owl_property.OWLDataProperty, direct: bool = True) -> Iterable[owlapy.owl_literal.OWLLiteral] Gets all values for the given data property expression that appear in the knowledge base. :param pe: The data property expression whose values are to be retrieved :param direct: Specifies if only the direct values of the data property pe should be retrieved (True), or if the values of sub properties of pe should be taken into account (False). :returns: A set of OWLLiterals containing literals such that for each literal l in the set, the set of reasoner axioms entails DataPropertyAssertion(pe ind l) for any ind. .. py:method:: ind_data_properties(ind: owlapy.owl_individual.OWLNamedIndividual, direct: bool = True) -> Iterable[owlapy.owl_property.OWLDataProperty] Gets all data properties for the given individual that appear in the knowledge base. :param ind: The named individual whose data properties are to be retrieved :param direct: Specifies if the direct data properties should be retrieved (True), or if all data properties should be retrieved (False), so that sub properties are taken into account. :returns: All data properties pe where the set of reasoner axioms entails DataPropertyAssertion(pe ind l) for atleast one l. .. py:method:: ind_object_properties(ind: owlapy.owl_individual.OWLNamedIndividual, direct: bool = True) -> Iterable[owlapy.owl_property.OWLObjectProperty] Gets all object properties for the given individual that appear in the knowledge base. :param ind: The named individual whose object properties are to be retrieved :param direct: Specifies if the direct object properties should be retrieved (True), or if all object properties should be retrieved (False), so that sub properties are taken into account. :returns: All data properties pe where the set of reasoner axioms entails ObjectPropertyAssertion(pe ind ind2) for atleast one ind2.