owlapy
Submodules
- owlapy.abstracts
- owlapy.agen_kg
- owlapy.class_expression
- owlapy.converter
- owlapy.entities
- owlapy.expressivity
- owlapy.iri
- owlapy.marked_entity_generator_converter
- owlapy.meta_classes
- owlapy.namespaces
- owlapy.nir
- owlapy.owl_annotation
- owlapy.owl_axiom
- owlapy.owl_data_ranges
- owlapy.owl_datatype
- owlapy.owl_hierarchy
- owlapy.owl_individual
- owlapy.owl_literal
- owlapy.owl_object
- owlapy.owl_ontology
- owlapy.owl_property
- owlapy.owl_reasoner
- owlapy.owl_reasoner_nir
- owlapy.owl_reasoner_rdflib
- owlapy.owlapi_dlsyntax
- owlapy.owlapi_mapper
- owlapy.parser
- owlapy.providers
- owlapy.render
- owlapy.scripts
- owlapy.static_funcs
- owlapy.swrl
- owlapy.util_owl_static_funcs
- owlapy.utils
- owlapy.vocab
Classes
Neural instance retriever as an |
|
A pure Python OWL reasoner based on RDFLib. |
Functions
|
Convert an OWL Class Expression (https://www.w3.org/TR/owl2-syntax/#Class_Expressions) into a SPARQL query |
Convert an OWL Class Expression (https://www.w3.org/TR/owl2-syntax/#Class_Expressions) into a SPARQL query |
|
|
Compute the DL expressivity name of an ontology, e.g. |
|
|
|
|
|
|
|
Package Contents
- owlapy.owl_expression_to_sparql(expression: owlapy.class_expression.OWLClassExpression = None, root_variable: str = '?x', values: Iterable[owlapy.owl_individual.OWLNamedIndividual] | None = None, for_all_de_morgan: bool = True, named_individuals: bool = False, validate: bool = False, negation_default: bool = True, sub_property_resolver: Callable | None = None, inverse_property_resolver: Callable | None = None, subclass_resolver: Callable | None = None) str[source]
Convert an OWL Class Expression (https://www.w3.org/TR/owl2-syntax/#Class_Expressions) into a SPARQL query root variable: the variable that will be projected expression: the class expression to be transformed to a SPARQL query
values: positive or negative examples from a class expression problem. Unclear for_all_de_morgan: if set to True, the SPARQL mapping will use the mapping containing the nested FILTER NOT EXISTS patterns for the universal quantifier (¬(∃r.¬C)), instead of the counting query named_individuals: if set to True, the generated SPARQL query will return only entities that are instances of owl:NamedIndividual validate: if set to True, validates the generated SPARQL query using rdflib.parseQuery (slower but safer) negation_default: if True (closed world, the default), OWLObjectComplementOf is translated via FILTER NOT EXISTS; if False (open world), OWLObjectComplementOf always contributes no results. sub_property_resolver: optional callable mapping a property to its sub-properties, used to expand every rendered property into a SPARQL property-path alternation of itself and its sub-properties. inverse_property_resolver: optional callable mapping an object property to its declared owl:inverseOf partner(s), used to expand every rendered object property with a reverse (^) path alternative. subclass_resolver: optional callable mapping a class to its subclasses, used to expand every named class membership triple to also match individuals typed only at a subclass.
- owlapy.owl_expression_to_sparql_with_confusion_matrix(expression: owlapy.class_expression.OWLClassExpression, positive_examples: Iterable[owlapy.owl_individual.OWLNamedIndividual] | None, negative_examples: Iterable[owlapy.owl_individual.OWLNamedIndividual] | None, root_variable: str = '?x', for_all_de_morgan: bool = True, named_individuals: bool = False, validate: bool = False) str[source]
Convert an OWL Class Expression (https://www.w3.org/TR/owl2-syntax/#Class_Expressions) into a SPARQL query root variable: the variable that will be projected expression: the class expression to be transformed to a SPARQL query positive_examples: positive examples from a class expression problem negative_examples: positive examples from a class expression problem for_all_de_morgan: if set to True, the SPARQL mapping will use the mapping containing the nested FILTER NOT EXISTS patterns for the universal quantifier (¬(∃r.¬C)), instead of the counting query named_individuals: if set to True, the generated SPARQL query will return only entities that are instances of owl:NamedIndividual validate: if set to True, validates the generated SPARQL query using rdflib.parseQuery (slower but safer)
- owlapy.get_dl_expressivity(ontology: owlapy.owl_ontology.SyncOntology) str[source]
Compute the DL expressivity name of an ontology, e.g.
"ALCHN(D)".- Parameters:
ontology – A
SyncOntologyinstance.- Returns:
The standard Description Logic name for the ontology’s expressivity.
- Raises:
TypeError – If
ontologyis not backed by OWLAPI (onlySyncOntologyis supported, since it is the only ontology backend that exposes RBox axioms).
- class owlapy.NIRReasoner(ontology: owlapy.abstracts.abstract_owl_ontology.AbstractOWLOntology | str, *, model_path: str, embeddings_path: str | None = None, dataset_dir: str | None = None, th: float = 0.5, chunksize: int = 1024, symbolic_max_length: int = 1, model: str | None = None, device: str | None = None, fallback_reasoner: owlapy.abstracts.abstract_owl_reasoner.AbstractOWLReasoner | None = None)[source]
Bases:
owlapy.abstracts.abstract_owl_reasoner.AbstractOWLReasonerNeural instance retriever as an
AbstractOWLReasoner.- Parameters:
ontology – Ontology whose named individuals are scored.
model_path – Directory of a pretrained NIR encoder (
config.json+ weights + tokenizer).embeddings_path – Path to
*entity_embeddings.csv, or a dataset / embeddings directory. Composite also loads a sibling*relation_embeddings.csvwhen present.dataset_dir – Alternative to
embeddings_path: a NIR dataset folder (kb/,embeddings/).th – Membership threshold (paper default 0.5).
chunksize – Individuals scored per forward pass.
symbolic_max_length – Concepts of this length or shorter are answered by the fallback symbolic reasoner. Encoders were trained on longer expressions; named classes (length 1) should stay symbolic.
model – Optional architecture name (
transformer/lstm/gru/composite). Inferred fromconfig.jsonwhen omitted.device – Torch device. Defaults to CUDA when available.
fallback_reasoner – Optional TBox reasoner. Defaults to StructuralReasoner / RDFLibReasoner.
- ontology
- th = 0.5
- chunksize = 1024
- symbolic_max_length = 1
- dls_renderer
- device
- model_name
- all_individuals_arr
- all_ind_embs
- membership_scores(expr: str | owlapy.class_expression.OWLClassExpression)[source]
- instances(ce: owlapy.class_expression.OWLClassExpression, direct: bool = False, timeout: int = 1000) Iterable[owlapy.owl_individual.OWLNamedIndividual][source]
Gets the individuals which are instances of the specified class expression.
- Parameters:
ce – The class expression whose instances are to be retrieved.
direct – Specifies if the direct instances should be retrieved (True), or if all instances should be retrieved (False).
timeout – Time limit in seconds until results must be returned, else empty set is returned.
- Returns:
If direct is True, each named individual j where the set of reasoner axioms entails DirectClassAssertion(ce, j). If direct is False, each named individual j where the set of reasoner axioms entails ClassAssertion(ce, j). If ce is unsatisfiable with respect to the set of reasoner axioms then nothing returned.
- get_root_ontology() owlapy.abstracts.abstract_owl_ontology.AbstractOWLOntology[source]
Gets the “root” ontology that is loaded into this reasoner. The reasoner takes into account the axioms in this ontology and its import’s closure.
- data_property_domains(pe: owlapy.owl_property.OWLDataProperty, direct: bool = False) Iterable[owlapy.class_expression.OWLClassExpression][source]
- Gets the class expressions that are the direct or indirect domains of this property with respect to the
imports closure of the root ontology.
- Parameters:
pe – The property expression whose domains are to be retrieved.
direct – Specifies if the direct domains should be retrieved (True), or if all domains should be retrieved (False).
- Returns:
Let N = equivalent_classes(DataSomeValuesFrom(pe rdfs:Literal)). If direct is True: then if N is not empty then the return value is N, else the return value is the result of super_classes(DataSomeValuesFrom(pe rdfs:Literal), true). If direct is False: then the result of super_classes(DataSomeValuesFrom(pe rdfs:Literal), false) together with N if N is non-empty. (Note, rdfs:Literal is the top datatype).
- object_property_domains(pe: owlapy.owl_property.OWLObjectProperty, direct: bool = False) Iterable[owlapy.class_expression.OWLClassExpression][source]
- Gets the class expressions that are the direct or indirect domains of this property with respect to the
imports closure of the root ontology.
- Parameters:
pe – The property expression whose domains are to be retrieved.
direct – Specifies if the direct domains should be retrieved (True), or if all domains should be retrieved (False).
- Returns:
Let N = equivalent_classes(ObjectSomeValuesFrom(pe owl:Thing)). If direct is True: then if N is not empty then the return value is N, else the return value is the result of super_classes(ObjectSomeValuesFrom(pe owl:Thing), true). If direct is False: then the result of super_classes(ObjectSomeValuesFrom(pe owl:Thing), false) together with N if N is non-empty.
- object_property_ranges(pe: owlapy.owl_property.OWLObjectProperty, direct: bool = False) Iterable[owlapy.class_expression.OWLClassExpression][source]
- Gets the class expressions that are the direct or indirect ranges of this property with respect to the
imports closure of the root ontology.
- Parameters:
pe – The property expression whose ranges are to be retrieved.
direct – Specifies if the direct ranges should be retrieved (True), or if all ranges should be retrieved (False).
- Returns:
Let N = equivalent_classes(ObjectSomeValuesFrom(ObjectInverseOf(pe) owl:Thing)). If direct is True: then if N is not empty then the return value is N, else the return value is the result of super_classes(ObjectSomeValuesFrom(ObjectInverseOf(pe) owl:Thing), true). If direct is False: then the result of super_classes(ObjectSomeValuesFrom(ObjectInverseOf(pe) owl:Thing), false) together with N if N is non-empty.
- equivalent_classes(ce: owlapy.class_expression.OWLClassExpression, *args, **kwargs) Iterable[owlapy.class_expression.OWLClassExpression][source]
Gets the class expressions that are equivalent to the specified class expression with respect to the set of reasoner axioms.
- Parameters:
ce – The class expression whose equivalent classes are to be retrieved.
- Returns:
All class expressions C where the root ontology imports closure entails EquivalentClasses(ce C). If ce is not a class name (i.e. it is an anonymous class expression) and there are no such classes C then there will be no result. If ce is unsatisfiable with respect to the set of reasoner axioms then owl:Nothing, i.e. the bottom node, will be returned.
- disjoint_classes(ce: owlapy.class_expression.OWLClassExpression, *args, **kwargs) Iterable[owlapy.class_expression.OWLClassExpression][source]
Gets the class expressions that are disjoint with specified class expression with respect to the set of reasoner axioms.
- Parameters:
ce – The class expression whose disjoint classes are to be retrieved.
- Returns:
All class expressions D where the set of reasoner axioms entails EquivalentClasses(D ObjectComplementOf(ce)) or StrictSubClassOf(D ObjectComplementOf(ce)).
- different_individuals(ind: owlapy.owl_individual.OWLNamedIndividual) Iterable[owlapy.owl_individual.OWLNamedIndividual][source]
Gets the individuals that are different from the specified individual with respect to the set of reasoner axioms.
- Parameters:
ind – The individual whose different individuals are to be retrieved.
- Returns:
All individuals x where the set of reasoner axioms entails DifferentIndividuals(ind x).
- same_individuals(ind: owlapy.owl_individual.OWLNamedIndividual) Iterable[owlapy.owl_individual.OWLNamedIndividual][source]
Gets the individuals that are the same as the specified individual with respect to the set of reasoner axioms.
- Parameters:
ind – The individual whose same individuals are to be retrieved.
- Returns:
All individuals x where the root ontology imports closure entails SameIndividual(ind x).
- equivalent_object_properties(op: owlapy.owl_property.OWLObjectPropertyExpression) Iterable[owlapy.owl_property.OWLObjectPropertyExpression][source]
Gets the simplified object properties that are equivalent to the specified object property with respect to the set of reasoner axioms.
- Parameters:
op – The object property whose equivalent object properties are to be retrieved.
- Returns:
All simplified object properties e where the root ontology imports closure entails EquivalentObjectProperties(op e). If op is unsatisfiable with respect to the set of reasoner axioms then owl:bottomDataProperty will be returned.
- equivalent_data_properties(dp: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_property.OWLDataProperty][source]
Gets the data properties that are equivalent to the specified data property with respect to the set of reasoner axioms.
- Parameters:
dp – The data property whose equivalent data properties are to be retrieved.
- Returns:
All data properties e where the root ontology imports closure entails EquivalentDataProperties(dp e). If dp is unsatisfiable with respect to the set of reasoner axioms then owl:bottomDataProperty will be returned.
- data_property_values(e: owlapy.owl_object.OWLEntity, pe: owlapy.owl_property.OWLDataProperty, *args, **kwargs) Iterable[owlapy.owl_literal.OWLLiteral][source]
Gets the data property values for the specified entity and data property expression.
- Parameters:
e – The owl entity (usually an individual) that is the subject of the data property values.
pe – The data property expression whose values are to be retrieved for the specified entity.
Note: Can be used to get values, for example, of ‘label’ property of owl entities such as classes and properties too (not only individuals).
- 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).
- object_property_values(ind: owlapy.owl_individual.OWLNamedIndividual, pe: owlapy.owl_property.OWLObjectPropertyExpression, *args, **kwargs) Iterable[owlapy.owl_individual.OWLNamedIndividual][source]
Gets the object property values for the specified individual and object property expression.
- Parameters:
ind – The individual that is the subject of the object property values.
pe – The object property expression whose values are to be retrieved for the specified individual.
- Returns:
The named individuals such that for each individual j, the set of reasoner axioms entails ObjectPropertyAssertion(pe ind j).
- sub_classes(ce: owlapy.class_expression.OWLClassExpression, direct: bool = False, *args, **kwargs) Iterable[owlapy.class_expression.OWLClassExpression][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).
- 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.
- super_classes(ce: owlapy.class_expression.OWLClassExpression, direct: bool = False, *args, **kwargs) Iterable[owlapy.class_expression.OWLClassExpression][source]
Gets the stream of named classes that are the strict (potentially direct) super classes of the specified class expression with respect to the imports closure of the root ontology.
- Parameters:
ce – The class expression whose strict (direct) super classes are to be retrieved.
direct – Specifies if the direct super classes should be retrieved (True) or if the all super classes (ancestors) classes should be retrieved (False).
- Returns:
If direct is True, each class C where the set of reasoner axioms entails DirectSubClassOf(ce, C). If direct is False, each class C where set of reasoner axioms entails StrictSubClassOf(ce, C). If ce is equivalent to owl:Thing then nothing will be returned.
- disjoint_object_properties(op: owlapy.owl_property.OWLObjectPropertyExpression, *args, **kwargs) Iterable[owlapy.owl_property.OWLObjectPropertyExpression][source]
Gets the simplified object properties that are disjoint with the specified object property with respect to the set of reasoner axioms.
- Parameters:
op – The object property whose disjoint object properties are to be retrieved.
- Returns:
All simplified object properties e where the root ontology imports closure entails EquivalentObjectProperties(e ObjectPropertyComplementOf(op)) or StrictSubObjectPropertyOf(e ObjectPropertyComplementOf(op)).
- disjoint_data_properties(dp: owlapy.owl_property.OWLDataProperty, *args, **kwargs) Iterable[owlapy.owl_property.OWLDataProperty][source]
Gets the data properties that are disjoint with the specified data property with respect to the set of reasoner axioms.
- Parameters:
dp – The data property whose disjoint data properties are to be retrieved.
- Returns:
All data properties e where the root ontology imports closure entails EquivalentDataProperties(e DataPropertyComplementOf(dp)) or StrictSubDataPropertyOf(e DataPropertyComplementOf(dp)).
- sub_data_properties(dp: owlapy.owl_property.OWLDataProperty, direct: bool = False, *args, **kwargs) Iterable[owlapy.owl_property.OWLDataProperty][source]
Gets the set of named data properties that are the strict (potentially direct) subproperties of the specified data property expression with respect to the imports closure of the root ontology.
- Parameters:
dp – The data property 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, each property P where the set of reasoner axioms entails DirectSubDataPropertyOf(P, pe). If direct is False, each property P where the set of reasoner axioms entails StrictSubDataPropertyOf(P, pe). If pe is equivalent to owl:bottomDataProperty then nothing will be returned.
- super_data_properties(dp: owlapy.owl_property.OWLDataProperty, direct: bool = False, *args, **kwargs) Iterable[owlapy.owl_property.OWLDataProperty][source]
Gets the stream of data properties that are the strict (potentially direct) super properties of the specified data property with respect to the imports closure of the root ontology.
- Parameters:
dp (OWLDataProperty) – The data property whose super properties are to be retrieved.
direct (bool) – Specifies if the direct super properties should be retrieved (True) or if the all super properties (ancestors) should be retrieved (False).
- Returns:
Iterable of super properties.
- sub_object_properties(op: owlapy.owl_property.OWLObjectPropertyExpression, direct: bool = False, *args, **kwargs) 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.
- super_object_properties(op: owlapy.owl_property.OWLObjectPropertyExpression, direct: bool = False, *args, **kwargs) Iterable[owlapy.owl_property.OWLObjectPropertyExpression][source]
Gets the stream of object properties that are the strict (potentially direct) super properties of the specified object property with respect to the imports closure of the root ontology.
- Parameters:
op (OWLObjectPropertyExpression) – The object property expression whose super properties are to be retrieved.
direct (bool) – Specifies if the direct super properties should be retrieved (True) or if the all super properties (ancestors) should be retrieved (False).
- Returns:
Iterable of super properties.
- types(ind: owlapy.owl_individual.OWLNamedIndividual, direct: bool = False) Iterable[source]
Gets the named classes which are (potentially direct) types of the specified named individual.
- Parameters:
ind – The individual whose types are to be retrieved.
direct – Specifies if the direct types should be retrieved (True), or if all types should be retrieved (False).
- Returns:
If direct is True, each named class C where the set of reasoner axioms entails DirectClassAssertion(C, ind). If direct is False, each named class C where the set of reasoner axioms entails ClassAssertion(C, ind).
- data_property_ranges(pe: owlapy.owl_property.OWLDataProperty, direct: bool = False) Iterable[owlapy.owl_data_ranges.OWLDataRange][source]
Gets the data ranges that are the direct or indirect ranges of this property with respect to the imports closure of the root ontology.
- Parameters:
pe – The property expression whose ranges are to be retrieved.
direct – Specifies if the direct ranges should be retrieved (True), or if all ranges should be retrieved (False).
Returns:
- class owlapy.RDFLibReasoner(ontology: owlapy.abstracts.abstract_owl_ontology.AbstractOWLOntology | str, *, class_cache: bool = True, property_cache: bool = True, infer_property_values: bool = False, infer_data_property_values: bool = False, negation_default: bool = True, sub_properties: bool = False)[source]
Bases:
owlapy.abstracts.abstract_owl_reasoner.AbstractOWLReasonerA pure Python OWL reasoner based on RDFLib.
This reasoner uses SPARQL queries over an RDF graph to perform reasoning tasks. It’s designed as a drop-in replacement for StructuralReasoner with better predictability and no owlready2/Java dependencies for basic operations.
Features: - Pure Python implementation using RDFLib - SPARQL-based reasoning - Efficient graph traversal with caching - Support for basic OWL 2 class expressions - Direct and indirect hierarchy navigation for classes, object properties and data properties - Domain/range, equivalence, disjointness and same/different-individual queries, including the
RDF-list-based owl:AllDisjointProperties/owl:AllDifferent axiom forms
Limitations: - Does not perform OWL 2 DL inference/entailment (use HermiT/Pellet via SyncReasoner for that) —
results reflect asserted axioms plus simple transitive closure over sub-class/sub-property hierarchies, not full description logic reasoning
Best suited for ontology navigation and simple instance retrieval
Does not handle all complex class expressions (nominals, cardinalities may be limited)
- instances(ce: owlapy.class_expression.OWLClassExpression, direct: bool = False, timeout: int = 1000) Iterable[owlapy.owl_individual.OWLNamedIndividual][source]
Get individuals that are instances of the specified class expression.
- Parameters:
ce – The class expression whose instances are to be retrieved.
direct – If True, retrieve only direct instances (not implemented - returns all).
timeout – Timeout in milliseconds (for compatibility, not enforced).
- Returns:
Iterable of named individuals that are instances of ce.
- sub_classes(ce: owlapy.class_expression.OWLClassExpression, direct: bool = False, only_named: bool = True) Iterable[owlapy.class_expression.OWLClassExpression][source]
Get subclasses of the specified class expression.
- Parameters:
ce – The class expression whose subclasses are to be retrieved.
direct – If True, only direct subclasses; if False, all descendant subclasses.
only_named – If True, only return named classes (OWLClass instances).
- Returns:
Iterable of subclass expressions.
- super_classes(ce: owlapy.class_expression.OWLClassExpression, direct: bool = False, only_named: bool = True) Iterable[owlapy.class_expression.OWLClassExpression][source]
Get superclasses of the specified class expression.
- Parameters:
ce – The class expression whose superclasses are to be retrieved.
direct – If True, only direct superclasses; if False, all ancestor superclasses.
only_named – If True, only return named classes (OWLClass instances).
- Returns:
Iterable of superclass expressions.
- equivalent_classes(ce: owlapy.class_expression.OWLClassExpression, only_named: bool = True) Iterable[owlapy.class_expression.OWLClassExpression][source]
Get classes equivalent to the specified class expression.
- Parameters:
ce – The class expression.
only_named – If True, only return named classes.
- Returns:
Iterable of equivalent class expressions.
- disjoint_classes(ce: owlapy.class_expression.OWLClassExpression, only_named: bool = True) Iterable[owlapy.class_expression.OWLClassExpression][source]
Get classes disjoint with the specified class expression.
- Parameters:
ce – The class expression.
only_named – If True, only return named classes.
- Returns:
Iterable of disjoint class expressions.
- object_property_values(ind: owlapy.owl_individual.OWLNamedIndividual, pe: owlapy.owl_property.OWLObjectPropertyExpression, direct: bool = True) Iterable[owlapy.owl_individual.OWLNamedIndividual][source]
Get object property values for an individual.
- Parameters:
ind – The individual.
pe – The object property expression.
direct – Whether to consider only direct assertions.
- Returns:
Iterable of individuals that are values of the property for ind.
- get_root_ontology() owlapy.abstracts.abstract_owl_ontology.AbstractOWLOntology[source]
Gets the root ontology that is loaded into this reasoner.
- types(ind: owlapy.owl_individual.OWLNamedIndividual, direct: bool = False) Iterable[owlapy.class_expression.OWLClass][source]
Gets the named classes which are (potentially direct) types of the specified named individual.
- Parameters:
ind – The individual whose types are to be retrieved.
direct – If True, only direct types; if False, all types.
- Returns:
Iterable of OWLClass representing the types of the individual.
- data_property_domains(pe: owlapy.owl_property.OWLDataProperty, direct: bool = False) Iterable[owlapy.class_expression.OWLClassExpression][source]
Gets the class expressions that are the domains of this data property.
- object_property_domains(pe: owlapy.owl_property.OWLObjectProperty, direct: bool = False) Iterable[owlapy.class_expression.OWLClassExpression][source]
Gets the class expressions that are the domains of this object property.
- object_property_ranges(pe: owlapy.owl_property.OWLObjectProperty, direct: bool = False) Iterable[owlapy.class_expression.OWLClassExpression][source]
Gets the class expressions that are the ranges of this object property.
- data_property_values(e: owlapy.owl_individual.OWLNamedIndividual, pe: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_literal.OWLLiteral][source]
Gets the data property values for the specified entity and data property.
- different_individuals(ind: owlapy.owl_individual.OWLNamedIndividual) Iterable[owlapy.owl_individual.OWLNamedIndividual][source]
Gets the individuals that are different from the specified individual.
- same_individuals(ind: owlapy.owl_individual.OWLNamedIndividual)[source]
Gets the individuals that are the same as the specified individual.
- equivalent_object_properties(op: owlapy.owl_property.OWLObjectPropertyExpression) Iterable[owlapy.owl_property.OWLObjectPropertyExpression][source]
Gets the object properties that are equivalent to the specified object property.
- equivalent_data_properties(dp: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_property.OWLDataProperty][source]
Gets the data properties that are equivalent to the specified data property.
- disjoint_object_properties(op: owlapy.owl_property.OWLObjectPropertyExpression) Iterable[owlapy.owl_property.OWLObjectPropertyExpression][source]
Gets the object properties that are disjoint with the specified object property.
- disjoint_data_properties(dp: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_property.OWLDataProperty][source]
Gets the data properties that are disjoint with the specified data property.
- sub_object_properties(op: owlapy.owl_property.OWLObjectPropertyExpression, direct: bool = False) Iterable[owlapy.owl_property.OWLObjectPropertyExpression][source]
Gets the sub object properties of the specified object property.
- super_object_properties(op: owlapy.owl_property.OWLObjectPropertyExpression, direct: bool = False) Iterable[owlapy.owl_property.OWLObjectPropertyExpression][source]
Gets the super object properties of the specified object property.
- sub_data_properties(dp: owlapy.owl_property.OWLDataProperty, direct: bool = False) Iterable[owlapy.owl_property.OWLDataProperty][source]
Gets the sub data properties of the specified data property.
- super_data_properties(dp: owlapy.owl_property.OWLDataProperty, direct: bool = False) Iterable[owlapy.owl_property.OWLDataProperty][source]
Gets the super data properties of the specified data property.
- owlapy.dl_to_owl_expression(dl_expression: str, namespace: str, prefixes: Mapping[str, str | owlapy.namespaces.Namespaces] | None = None)[source]
- owlapy.manchester_to_owl_expression(manchester_expression: str, namespace: str, prefixes: Mapping[str, str | owlapy.namespaces.Namespaces] | None = None)[source]
- owlapy.owl_expression_to_dl(o: owlapy.owl_object.OWLObject) str[source]
- owlapy.owl_expression_to_manchester(o: owlapy.owl_object.OWLObject) str[source]