From 70f251351213f18bbdc75a01094bf517f5231adf Mon Sep 17 00:00:00 2001 From: LckyLke Date: Fri, 8 Nov 2024 09:32:36 +0000 Subject: [PATCH] deploy: 501e947e98906faae841a731c4ff632c788ea068 --- _modules/index.html | 1 - _modules/owlapy/owl_reasoner.html | 102 +++------ _modules/owlapy/util_owl_static_funcs.html | 173 -------------- _sources/autoapi/owlapy/index.rst.txt | 1 - .../autoapi/owlapy/owl_reasoner/index.rst.txt | 5 - .../util_owl_static_funcs/index.rst.txt | 49 ---- .../abstract_owl_ontology/index.html | 1 - .../abstract_owl_ontology_manager/index.html | 1 - .../abstract_owl_reasoner/index.html | 1 - autoapi/owlapy/abstracts/index.html | 1 - .../class_expression/index.html | 1 - autoapi/owlapy/class_expression/index.html | 1 - .../nary_boolean_expression/index.html | 1 - .../class_expression/owl_class/index.html | 1 - .../class_expression/restriction/index.html | 1 - autoapi/owlapy/converter/index.html | 1 - autoapi/owlapy/entities/index.html | 1 - autoapi/owlapy/index.html | 2 - autoapi/owlapy/iri/index.html | 1 - autoapi/owlapy/meta_classes/index.html | 1 - autoapi/owlapy/namespaces/index.html | 1 - autoapi/owlapy/owl_annotation/index.html | 1 - autoapi/owlapy/owl_axiom/index.html | 1 - autoapi/owlapy/owl_data_ranges/index.html | 1 - autoapi/owlapy/owl_datatype/index.html | 1 - autoapi/owlapy/owl_hierarchy/index.html | 1 - autoapi/owlapy/owl_individual/index.html | 1 - autoapi/owlapy/owl_literal/index.html | 1 - autoapi/owlapy/owl_object/index.html | 1 - autoapi/owlapy/owl_ontology/index.html | 1 - .../owlapy/owl_ontology_manager/index.html | 1 - autoapi/owlapy/owl_property/index.html | 1 - autoapi/owlapy/owl_reasoner/index.html | 7 - autoapi/owlapy/owlapi_mapper/index.html | 1 - autoapi/owlapy/parser/index.html | 1 - autoapi/owlapy/providers/index.html | 1 - autoapi/owlapy/render/index.html | 1 - autoapi/owlapy/static_funcs/index.html | 5 +- .../owlapy/util_owl_static_funcs/index.html | 213 ------------------ autoapi/owlapy/utils/index.html | 5 +- autoapi/owlapy/vocab/index.html | 1 - genindex.html | 17 +- objects.inv | Bin 9873 -> 9837 bytes owlapy.pdf | Bin 654792 -> 649645 bytes py-modindex.html | 5 - searchindex.js | 2 +- 46 files changed, 36 insertions(+), 581 deletions(-) delete mode 100644 _modules/owlapy/util_owl_static_funcs.html delete mode 100644 _sources/autoapi/owlapy/util_owl_static_funcs/index.rst.txt delete mode 100644 autoapi/owlapy/util_owl_static_funcs/index.html diff --git a/_modules/index.html b/_modules/index.html index 3788f781..baa86c55 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -108,7 +108,6 @@

All modules for which code is available

  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/_modules/owlapy/owl_reasoner.html b/_modules/owlapy/owl_reasoner.html index ffdc2949..d5068672 100644 --- a/_modules/owlapy/owl_reasoner.html +++ b/_modules/owlapy/owl_reasoner.html @@ -110,7 +110,7 @@

    Source code for owlapy.owl_reasoner

         OWLPropertyExpression, OWLDataPropertyExpression
     from owlapy.owl_individual import OWLNamedIndividual
     from owlapy.owl_literal import OWLLiteral
    -from owlapy.utils import LRUCache, run_with_timeout
    +from owlapy.utils import run_with_timeout
     from owlapy.abstracts.abstract_owl_reasoner import AbstractOWLReasoner
     logger = logging.getLogger(__name__)
     
    @@ -121,37 +121,6 @@ 

    Source code for owlapy.owl_reasoner

     [docs]
     class StructuralReasoner(AbstractOWLReasoner):
         """Tries to check instances fast (but maybe incomplete)."""
    -    __slots__ = '_ontology', '_world', \
    -                '_ind_set', '_cls_to_ind', \
    -                '_has_prop', 'class_cache', \
    -                '_objectsomevalues_cache', '_datasomevalues_cache', '_objectcardinality_cache', \
    -                '_property_cache', \
    -                '_obj_prop', '_obj_prop_inv', '_data_prop', \
    -                '_negation_default', '_sub_properties', \
    -                '__warned'
    -
    -    _ontology: Ontology
    -    _world: owlready2.World
    -    _cls_to_ind: Dict[OWLClass, FrozenSet[OWLNamedIndividual]]  # Class => individuals
    -    _has_prop: Mapping[Type[_P], LRUCache[_P, FrozenSet[OWLNamedIndividual]]]  # Type => Property => individuals
    -    _ind_set: FrozenSet[OWLNamedIndividual]
    -    # ObjectSomeValuesFrom => individuals
    -    _objectsomevalues_cache: LRUCache[OWLClassExpression, FrozenSet[OWLNamedIndividual]]
    -    # DataSomeValuesFrom => individuals
    -    _datasomevalues_cache: LRUCache[OWLClassExpression, FrozenSet[OWLNamedIndividual]]
    -    # ObjectCardinalityRestriction => individuals
    -    _objectcardinality_cache: LRUCache[OWLClassExpression, FrozenSet[OWLNamedIndividual]]
    -    # ObjectProperty => { individual => individuals }
    -    _obj_prop: Dict[OWLObjectProperty, Mapping[OWLNamedIndividual, Set[OWLNamedIndividual]]]
    -    # ObjectProperty => { individual => individuals }
    -    _obj_prop_inv: Dict[OWLObjectProperty, Mapping[OWLNamedIndividual, Set[OWLNamedIndividual]]]
    -    # DataProperty => { individual => literals }
    -    _data_prop: Dict[OWLDataProperty, Mapping[OWLNamedIndividual, Set[OWLLiteral]]]
    -    class_cache: bool
    -    _property_cache: bool
    -    _negation_default: bool
    -    _sub_properties: bool
    -
         def __init__(self, ontology: AbstractOWLOntology, *, class_cache: bool = True,
                      property_cache: bool = True, negation_default: bool = True, sub_properties: bool = False):
             """Fast instance checker.
    @@ -165,36 +134,34 @@ 

    Source code for owlapy.owl_reasoner

                 """
             super().__init__(ontology)
             assert isinstance(ontology, Ontology)
    -        self._world = ontology._world
    -        self._ontology = ontology
    -        self.class_cache = class_cache
    -        self._property_cache = property_cache
    -        self._negation_default = negation_default
    -        self._sub_properties = sub_properties
    -        self.__warned = 0
    +        self._world: owlready2.World = ontology._world
    +        self._ontology: Ontology = ontology
    +        self.class_cache: bool = class_cache
    +        self._property_cache: bool = property_cache
    +        self._negation_default: bool = negation_default
    +        self._sub_properties: bool = sub_properties
    +        self.__warned: int = 0
             self._init()
     
    -    def _init(self, cache_size=128):
    -
    -        individuals = self._ontology.individuals_in_signature()
    -        self._ind_set = frozenset(individuals)
    -        self._objectsomevalues_cache = LRUCache(maxsize=cache_size)
    -        self._datasomevalues_cache = LRUCache(maxsize=cache_size)
    -        self._objectcardinality_cache = LRUCache(maxsize=cache_size)
    +    def _init(self):
             if self.class_cache:
    -            self._cls_to_ind = dict()
    +            # Class => individuals
    +            self._cls_to_ind: Dict[OWLClass, FrozenSet[OWLNamedIndividual]] = {} 
     
             if self._property_cache:
    -            self._obj_prop = dict()
    -            self._obj_prop_inv = dict()
    -            self._data_prop = dict()
    +            # ObjectProperty => { individual => individuals }
    +            self._obj_prop: Dict[OWLObjectProperty, Mapping[OWLNamedIndividual, Set[OWLNamedIndividual]]] = dict()
    +             # ObjectProperty => { individual => individuals }
    +            self._obj_prop_inv: Dict[OWLObjectProperty, Mapping[OWLNamedIndividual, Set[OWLNamedIndividual]]] = dict()
    +            # DataProperty => { individual => literals }
    +            self._data_prop: Dict[OWLDataProperty, Mapping[OWLNamedIndividual, Set[OWLLiteral]]] = dict() 
             else:
    -            self._has_prop = MappingProxyType({
    -                OWLDataProperty: LRUCache(maxsize=cache_size),
    -                OWLObjectProperty: LRUCache(maxsize=cache_size),
    -                OWLObjectInverseOf: LRUCache(maxsize=cache_size),
    -            })
    -
    +            self._has_prop: Mapping[Type[_P], Dict[_P, FrozenSet[OWLNamedIndividual]]] = {
    +                OWLDataProperty: {},
    +                OWLObjectProperty: {},
    +                OWLObjectInverseOf: {},
    +            }
    +           
     
    [docs] def reset(self): @@ -793,7 +760,8 @@

    Source code for owlapy.owl_reasoner

                             opc[s] = set()
                         opc[s] |= {o}
             else:
    -            for s in self._ind_set:
    +            all_ = frozenset(self._ontology.individuals_in_signature())
    +            for s in all_:
                     individuals = set(self.object_property_values(s, pe, not self._sub_properties))
                     if individuals:
                         opc[s] = individuals
    @@ -833,8 +801,8 @@ 

    Source code for owlapy.owl_reasoner

                         func = self.data_property_values
                     else:
                         func = self.object_property_values
    -
    -                for s in self._ind_set:
    +                all_ = frozenset(self._ontology.individuals_in_signature())
    +                for s in all_:
                         try:
                             next(iter(func(s, pe, not self._sub_properties)))
                             subs |= {s}
    @@ -939,9 +907,6 @@ 

    Source code for owlapy.owl_reasoner

     
         @_find_instances.register
         def _(self, ce: OWLObjectSomeValuesFrom) -> FrozenSet[OWLNamedIndividual]:
    -        if ce in self._objectsomevalues_cache:
    -            return self._objectsomevalues_cache[ce]
    -
             p = ce.get_property()
             assert isinstance(p, OWLObjectPropertyExpression)
             if not self._property_cache and ce.get_filler().is_owl_thing():
    @@ -951,13 +916,12 @@ 

    Source code for owlapy.owl_reasoner

     
             ind = self._find_some_values(p, filler_ind)
     
    -        self._objectsomevalues_cache[ce] = ind
             return ind
     
         @_find_instances.register
         def _(self, ce: OWLObjectComplementOf) -> FrozenSet[OWLNamedIndividual]:
             if self._negation_default:
    -            all_ = self._ind_set
    +            all_ = frozenset(self._ontology.individuals_in_signature())
                 complement_ind = self._find_instances(ce.get_operand())
                 return all_ ^ complement_ind
             else:
    @@ -993,7 +957,7 @@ 

    Source code for owlapy.owl_reasoner

     
         @_find_instances.register
         def _(self, ce: OWLObjectMaxCardinality) -> FrozenSet[OWLNamedIndividual]:
    -        all_ = self._ind_set
    +        all_ = frozenset(self._ontology.individuals_in_signature())
             min_ind = self._find_instances(OWLObjectMinCardinality(cardinality=ce.get_cardinality() + 1,
                                                                    property=ce.get_property(),
                                                                    filler=ce.get_filler()))
    @@ -1004,9 +968,6 @@ 

    Source code for owlapy.owl_reasoner

             return self._get_instances_object_card_restriction(ce)
     
         def _get_instances_object_card_restriction(self, ce: OWLObjectCardinalityRestriction):
    -        if ce in self._objectcardinality_cache:
    -            return self._objectcardinality_cache[ce]
    -
             p = ce.get_property()
             assert isinstance(p, OWLObjectPropertyExpression)
     
    @@ -1028,14 +989,10 @@ 

    Source code for owlapy.owl_reasoner

     
             ind = self._find_some_values(p, filler_ind, min_count=min_count, max_count=max_count)
     
    -        self._objectcardinality_cache[ce] = ind
             return ind
     
         @_find_instances.register
         def _(self, ce: OWLDataSomeValuesFrom) -> FrozenSet[OWLNamedIndividual]:
    -        if ce in self._datasomevalues_cache:
    -            return self._datasomevalues_cache[ce]
    -
             pe = ce.get_property()
             filler = ce.get_filler()
             assert isinstance(pe, OWLDataProperty)
    @@ -1124,7 +1081,6 @@ 

    Source code for owlapy.owl_reasoner

                 raise ValueError
     
             r = frozenset(ind)
    -        self._datasomevalues_cache[ce] = r
             return r
     
         @_find_instances.register
    diff --git a/_modules/owlapy/util_owl_static_funcs.html b/_modules/owlapy/util_owl_static_funcs.html
    deleted file mode 100644
    index 2a0c25f6..00000000
    --- a/_modules/owlapy/util_owl_static_funcs.html
    +++ /dev/null
    @@ -1,173 +0,0 @@
    -
    -
    -
    -
    -
    -  
    -  
    -  owlapy.util_owl_static_funcs — OWLAPY 1.3.2 documentation
    -      
    -      
    -      
    -      
    -      
    -      
    -
    -  
    -    
    -      
    -      
    -      
    -      
    -      
    -    
    -    
    -     
    -
    -
    - 
    -  
    - - -
    - -
    -
    -
    - -
    -
    -
    -
    - -

    Source code for owlapy.util_owl_static_funcs

    -from .owl_ontology import Ontology
    -from .owl_ontology_manager import OntologyManager
    -from typing import List
    -from .class_expression import OWLClassExpression, OWLClass
    -from .iri import IRI
    -from .owl_axiom import OWLEquivalentClassesAxiom
    -
    -
    -[docs] -def save_owl_class_expressions(expressions: OWLClassExpression | List[OWLClassExpression], - path: str = 'predictions', - rdf_format: str = 'rdfxml', - namespace:str=None) -> None: - """ - Saves a set of OWL class expressions to an ontology file in RDF/XML format. - - This function takes one or more OWL class expressions, creates an ontology, - and saves the expressions as OWL equivalent class axioms in the specified RDF format. - By default, it saves the file to the specified path using the 'rdfxml' format. - - Args: - expressions (OWLClassExpression | List[OWLClassExpression]): A single or a list of OWL class expressions - to be saved as equivalent class axioms. - path (str, optional): The file path where the ontology will be saved. Defaults to 'predictions'. - rdf_format (str, optional): RDF serialization format for saving the ontology. Currently only - supports 'rdfxml'. Defaults to 'rdfxml'. - namespace (str, optional): The namespace URI used for the ontology. If None, defaults to - 'https://dice-research.org/predictions#'. Must end with '#'. - - Raises: - AssertionError: If `expressions` is neither an OWLClassExpression nor a list of OWLClassExpression. - AssertionError: If `rdf_format` is not 'rdfxml'. - AssertionError: If `namespace` does not end with a '#'. - - Example: - >>> from some_module import OWLClassExpression - >>> expr1 = OWLClassExpression("SomeExpression1") - >>> expr2 = OWLClassExpression("SomeExpression2") - >>> save_owl_class_expressions([expr1, expr2], path="my_ontology.owl", rdf_format="rdfxml") - """ - assert isinstance(expressions, OWLClassExpression) or isinstance(expressions[0], - OWLClassExpression), "expressions must be either OWLClassExpression or a list of OWLClassExpression" - assert rdf_format == 'rdfxml', f'Format {rdf_format} not implemented. Please use rdfxml' - - if isinstance(expressions, OWLClassExpression): - expressions = [expressions] - - namespace= 'https://dice-research.org/predictions#' if namespace is None else namespace - assert "#" == namespace[-1], "namespace must end with #" - # () - manager = OntologyManager() - # () - ontology:Ontology = manager.create_ontology(namespace) - # () Iterate over concepts - for th, i in enumerate(expressions): - cls_a = OWLClass(IRI.create(namespace, str(th))) - equivalent_classes_axiom = OWLEquivalentClassesAxiom([cls_a, i]) - ontology.add_axiom(equivalent_classes_axiom) - ontology.save(path=path, inplace=False, rdf_format=rdf_format)
    - -
    - -
    -
    - -
    -
    -
    -
    - - - - \ No newline at end of file diff --git a/_sources/autoapi/owlapy/index.rst.txt b/_sources/autoapi/owlapy/index.rst.txt index e9e1d562..2ef812c3 100644 --- a/_sources/autoapi/owlapy/index.rst.txt +++ b/_sources/autoapi/owlapy/index.rst.txt @@ -34,7 +34,6 @@ Submodules /autoapi/owlapy/providers/index /autoapi/owlapy/render/index /autoapi/owlapy/static_funcs/index - /autoapi/owlapy/util_owl_static_funcs/index /autoapi/owlapy/utils/index /autoapi/owlapy/vocab/index diff --git a/_sources/autoapi/owlapy/owl_reasoner/index.rst.txt b/_sources/autoapi/owlapy/owl_reasoner/index.rst.txt index 10d2dc57..439c6ad9 100644 --- a/_sources/autoapi/owlapy/owl_reasoner/index.rst.txt +++ b/_sources/autoapi/owlapy/owl_reasoner/index.rst.txt @@ -39,11 +39,6 @@ Module Contents Tries to check instances fast (but maybe incomplete). - .. py:attribute:: __slots__ - :value: ('_ontology', '_world', '_ind_set', '_cls_to_ind', '_has_prop', 'class_cache',... - - - .. py:attribute:: class_cache :type: bool diff --git a/_sources/autoapi/owlapy/util_owl_static_funcs/index.rst.txt b/_sources/autoapi/owlapy/util_owl_static_funcs/index.rst.txt deleted file mode 100644 index f9eb7e95..00000000 --- a/_sources/autoapi/owlapy/util_owl_static_funcs/index.rst.txt +++ /dev/null @@ -1,49 +0,0 @@ -owlapy.util_owl_static_funcs -============================ - -.. py:module:: owlapy.util_owl_static_funcs - - -Functions ---------- - -.. autoapisummary:: - - owlapy.util_owl_static_funcs.save_owl_class_expressions - - -Module Contents ---------------- - -.. py:function:: save_owl_class_expressions(expressions: owlapy.class_expression.OWLClassExpression | List[owlapy.class_expression.OWLClassExpression], path: str = 'predictions', rdf_format: str = 'rdfxml', namespace: str = None) -> None - - Saves a set of OWL class expressions to an ontology file in RDF/XML format. - - This function takes one or more OWL class expressions, creates an ontology, - and saves the expressions as OWL equivalent class axioms in the specified RDF format. - By default, it saves the file to the specified path using the 'rdfxml' format. - - :param expressions: A single or a list of OWL class expressions - to be saved as equivalent class axioms. - :type expressions: OWLClassExpression | List[OWLClassExpression] - :param path: The file path where the ontology will be saved. Defaults to 'predictions'. - :type path: str, optional - :param rdf_format: RDF serialization format for saving the ontology. Currently only - supports 'rdfxml'. Defaults to 'rdfxml'. - :type rdf_format: str, optional - :param namespace: The namespace URI used for the ontology. If None, defaults to - 'https://dice-research.org/predictions#'. Must end with '#'. - :type namespace: str, optional - - :raises AssertionError: If `expressions` is neither an OWLClassExpression nor a list of OWLClassExpression. - :raises AssertionError: If `rdf_format` is not 'rdfxml'. - :raises AssertionError: If `namespace` does not end with a '#'. - - .. rubric:: Example - - >>> from some_module import OWLClassExpression - >>> expr1 = OWLClassExpression("SomeExpression1") - >>> expr2 = OWLClassExpression("SomeExpression2") - >>> save_owl_class_expressions([expr1, expr2], path="my_ontology.owl", rdf_format="rdfxml") - - diff --git a/autoapi/owlapy/abstracts/abstract_owl_ontology/index.html b/autoapi/owlapy/abstracts/abstract_owl_ontology/index.html index dc4383b5..9a02959a 100644 --- a/autoapi/owlapy/abstracts/abstract_owl_ontology/index.html +++ b/autoapi/owlapy/abstracts/abstract_owl_ontology/index.html @@ -96,7 +96,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/abstracts/abstract_owl_ontology_manager/index.html b/autoapi/owlapy/abstracts/abstract_owl_ontology_manager/index.html index 70dfe8d7..44c9d588 100644 --- a/autoapi/owlapy/abstracts/abstract_owl_ontology_manager/index.html +++ b/autoapi/owlapy/abstracts/abstract_owl_ontology_manager/index.html @@ -96,7 +96,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/abstracts/abstract_owl_reasoner/index.html b/autoapi/owlapy/abstracts/abstract_owl_reasoner/index.html index 6627a4e6..482a4a67 100644 --- a/autoapi/owlapy/abstracts/abstract_owl_reasoner/index.html +++ b/autoapi/owlapy/abstracts/abstract_owl_reasoner/index.html @@ -97,7 +97,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/abstracts/index.html b/autoapi/owlapy/abstracts/index.html index 500ea81b..1feac6ed 100644 --- a/autoapi/owlapy/abstracts/index.html +++ b/autoapi/owlapy/abstracts/index.html @@ -156,7 +156,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/class_expression/class_expression/index.html b/autoapi/owlapy/class_expression/class_expression/index.html index 90317c89..0d52f8ca 100644 --- a/autoapi/owlapy/class_expression/class_expression/index.html +++ b/autoapi/owlapy/class_expression/class_expression/index.html @@ -97,7 +97,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/class_expression/index.html b/autoapi/owlapy/class_expression/index.html index 00540b77..9fa308a0 100644 --- a/autoapi/owlapy/class_expression/index.html +++ b/autoapi/owlapy/class_expression/index.html @@ -366,7 +366,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/class_expression/nary_boolean_expression/index.html b/autoapi/owlapy/class_expression/nary_boolean_expression/index.html index c7d1c052..fc5ab248 100644 --- a/autoapi/owlapy/class_expression/nary_boolean_expression/index.html +++ b/autoapi/owlapy/class_expression/nary_boolean_expression/index.html @@ -97,7 +97,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/class_expression/owl_class/index.html b/autoapi/owlapy/class_expression/owl_class/index.html index ce368f06..fa6e06fc 100644 --- a/autoapi/owlapy/class_expression/owl_class/index.html +++ b/autoapi/owlapy/class_expression/owl_class/index.html @@ -97,7 +97,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/class_expression/restriction/index.html b/autoapi/owlapy/class_expression/restriction/index.html index e8ae453a..920e3f28 100644 --- a/autoapi/owlapy/class_expression/restriction/index.html +++ b/autoapi/owlapy/class_expression/restriction/index.html @@ -98,7 +98,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/converter/index.html b/autoapi/owlapy/converter/index.html index aeb3cd92..10d9590d 100644 --- a/autoapi/owlapy/converter/index.html +++ b/autoapi/owlapy/converter/index.html @@ -139,7 +139,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/entities/index.html b/autoapi/owlapy/entities/index.html index 18725d6b..33352958 100644 --- a/autoapi/owlapy/entities/index.html +++ b/autoapi/owlapy/entities/index.html @@ -82,7 +82,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/index.html b/autoapi/owlapy/index.html index b41bbb31..2613d7e7 100644 --- a/autoapi/owlapy/index.html +++ b/autoapi/owlapy/index.html @@ -82,7 +82,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • @@ -164,7 +163,6 @@

    Submodulesowlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/iri/index.html b/autoapi/owlapy/iri/index.html index 7e2515cb..21a0870b 100644 --- a/autoapi/owlapy/iri/index.html +++ b/autoapi/owlapy/iri/index.html @@ -106,7 +106,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/meta_classes/index.html b/autoapi/owlapy/meta_classes/index.html index 955a47cf..2d30a729 100644 --- a/autoapi/owlapy/meta_classes/index.html +++ b/autoapi/owlapy/meta_classes/index.html @@ -109,7 +109,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/namespaces/index.html b/autoapi/owlapy/namespaces/index.html index 345c8085..6efd3309 100644 --- a/autoapi/owlapy/namespaces/index.html +++ b/autoapi/owlapy/namespaces/index.html @@ -102,7 +102,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_annotation/index.html b/autoapi/owlapy/owl_annotation/index.html index 22897421..04d28d45 100644 --- a/autoapi/owlapy/owl_annotation/index.html +++ b/autoapi/owlapy/owl_annotation/index.html @@ -104,7 +104,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_axiom/index.html b/autoapi/owlapy/owl_axiom/index.html index 1200617c..d84360e5 100644 --- a/autoapi/owlapy/owl_axiom/index.html +++ b/autoapi/owlapy/owl_axiom/index.html @@ -435,7 +435,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_data_ranges/index.html b/autoapi/owlapy/owl_data_ranges/index.html index a808df52..b43fd9a7 100644 --- a/autoapi/owlapy/owl_data_ranges/index.html +++ b/autoapi/owlapy/owl_data_ranges/index.html @@ -116,7 +116,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_datatype/index.html b/autoapi/owlapy/owl_datatype/index.html index 001c1d97..4c21b3bc 100644 --- a/autoapi/owlapy/owl_datatype/index.html +++ b/autoapi/owlapy/owl_datatype/index.html @@ -95,7 +95,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_hierarchy/index.html b/autoapi/owlapy/owl_hierarchy/index.html index 2356eb4d..4d9ba2ab 100644 --- a/autoapi/owlapy/owl_hierarchy/index.html +++ b/autoapi/owlapy/owl_hierarchy/index.html @@ -138,7 +138,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_individual/index.html b/autoapi/owlapy/owl_individual/index.html index fb024fc3..053beca8 100644 --- a/autoapi/owlapy/owl_individual/index.html +++ b/autoapi/owlapy/owl_individual/index.html @@ -99,7 +99,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_literal/index.html b/autoapi/owlapy/owl_literal/index.html index d3a59904..aed4f74f 100644 --- a/autoapi/owlapy/owl_literal/index.html +++ b/autoapi/owlapy/owl_literal/index.html @@ -128,7 +128,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_object/index.html b/autoapi/owlapy/owl_object/index.html index 88e55a41..a7ed28fc 100644 --- a/autoapi/owlapy/owl_object/index.html +++ b/autoapi/owlapy/owl_object/index.html @@ -119,7 +119,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_ontology/index.html b/autoapi/owlapy/owl_ontology/index.html index 9fe8b6df..7e9c0969 100644 --- a/autoapi/owlapy/owl_ontology/index.html +++ b/autoapi/owlapy/owl_ontology/index.html @@ -171,7 +171,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_ontology_manager/index.html b/autoapi/owlapy/owl_ontology_manager/index.html index 061a3e5c..fa1150fb 100644 --- a/autoapi/owlapy/owl_ontology_manager/index.html +++ b/autoapi/owlapy/owl_ontology_manager/index.html @@ -115,7 +115,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_property/index.html b/autoapi/owlapy/owl_property/index.html index c3061e24..7736b8d6 100644 --- a/autoapi/owlapy/owl_property/index.html +++ b/autoapi/owlapy/owl_property/index.html @@ -139,7 +139,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/owl_reasoner/index.html b/autoapi/owlapy/owl_reasoner/index.html index 75fc6d75..5559066d 100644 --- a/autoapi/owlapy/owl_reasoner/index.html +++ b/autoapi/owlapy/owl_reasoner/index.html @@ -82,7 +82,6 @@
  • Module Contents diff --git a/autoapi/owlapy/parser/index.html b/autoapi/owlapy/parser/index.html index 7bad77c4..dd453ce0 100644 --- a/autoapi/owlapy/parser/index.html +++ b/autoapi/owlapy/parser/index.html @@ -204,7 +204,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/providers/index.html b/autoapi/owlapy/providers/index.html index 0ff99ea8..ac44bf1d 100644 --- a/autoapi/owlapy/providers/index.html +++ b/autoapi/owlapy/providers/index.html @@ -96,7 +96,6 @@
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/render/index.html b/autoapi/owlapy/render/index.html index 7feabd9a..cf7ccfbe 100644 --- a/autoapi/owlapy/render/index.html +++ b/autoapi/owlapy/render/index.html @@ -109,7 +109,6 @@
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • diff --git a/autoapi/owlapy/static_funcs/index.html b/autoapi/owlapy/static_funcs/index.html index 7b34d83c..935bba0d 100644 --- a/autoapi/owlapy/static_funcs/index.html +++ b/autoapi/owlapy/static_funcs/index.html @@ -24,7 +24,7 @@ - + @@ -92,7 +92,6 @@ -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab
  • @@ -191,7 +190,7 @@

    Module Contents - +


    diff --git a/autoapi/owlapy/util_owl_static_funcs/index.html b/autoapi/owlapy/util_owl_static_funcs/index.html deleted file mode 100644 index 2d9e2396..00000000 --- a/autoapi/owlapy/util_owl_static_funcs/index.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - owlapy.util_owl_static_funcs — OWLAPY 1.3.2 documentation - - - - - - - - - - - - - - - - - - - - - - -
    - - -
    - -
    -
    -
    - -
    -
    -
    -
    - -
    -

    owlapy.util_owl_static_funcs

    -
    -

    Functions

    - - - - - - -

    save_owl_class_expressions(→ None)

    Saves a set of OWL class expressions to an ontology file in RDF/XML format.

    -
    -
    -

    Module Contents

    -
    -
    -owlapy.util_owl_static_funcs.save_owl_class_expressions(expressions: owlapy.class_expression.OWLClassExpression | List[owlapy.class_expression.OWLClassExpression], path: str = 'predictions', rdf_format: str = 'rdfxml', namespace: str = None) None[source]
    -

    Saves a set of OWL class expressions to an ontology file in RDF/XML format.

    -

    This function takes one or more OWL class expressions, creates an ontology, -and saves the expressions as OWL equivalent class axioms in the specified RDF format. -By default, it saves the file to the specified path using the ‘rdfxml’ format.

    -
    -
    Parameters:
    -
      -
    • expressions (OWLClassExpression | List[OWLClassExpression]) – A single or a list of OWL class expressions -to be saved as equivalent class axioms.

    • -
    • path (str, optional) – The file path where the ontology will be saved. Defaults to ‘predictions’.

    • -
    • rdf_format (str, optional) – RDF serialization format for saving the ontology. Currently only -supports ‘rdfxml’. Defaults to ‘rdfxml’.

    • -
    • namespace (str, optional) – The namespace URI used for the ontology. If None, defaults to -‘https://dice-research.org/predictions#’. Must end with ‘#’.

    • -
    -
    -
    Raises:
    -
      -
    • AssertionError – If expressions is neither an OWLClassExpression nor a list of OWLClassExpression.

    • -
    • AssertionError – If rdf_format is not ‘rdfxml’.

    • -
    • AssertionError – If namespace does not end with a ‘#’.

    • -
    -
    -
    -

    Example

    -
    >>> from some_module import OWLClassExpression
    ->>> expr1 = OWLClassExpression("SomeExpression1")
    ->>> expr2 = OWLClassExpression("SomeExpression2")
    ->>> save_owl_class_expressions([expr1, expr2], path="my_ontology.owl", rdf_format="rdfxml")
    -
    -
    -
    - -
    -
    - - -
    -
    - -
    -
    -
    -
    - - - - \ No newline at end of file diff --git a/autoapi/owlapy/utils/index.html b/autoapi/owlapy/utils/index.html index 8ca6c798..cbb211ca 100644 --- a/autoapi/owlapy/utils/index.html +++ b/autoapi/owlapy/utils/index.html @@ -25,7 +25,7 @@ - + @@ -82,7 +82,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • diff --git a/autoapi/owlapy/vocab/index.html b/autoapi/owlapy/vocab/index.html index 3c1b6807..1eee77e1 100644 --- a/autoapi/owlapy/vocab/index.html +++ b/autoapi/owlapy/vocab/index.html @@ -81,7 +81,6 @@
  • owlapy.providers
  • owlapy.render
  • owlapy.static_funcs
  • -
  • owlapy.util_owl_static_funcs
  • owlapy.utils
  • owlapy.vocab @@ -3262,8 +3251,6 @@

    S

  • (owlapy.owl_ontology.Ontology method)
  • -
  • save_owl_class_expressions() (in module owlapy.util_owl_static_funcs) -
  • save_world() (owlapy.OntologyManager method) - +