Owlapy

Latest version: v1.3.3

Safety actively analyzes 685525 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.3.3

In this new patch we have fixed some hashing-related bugs, made some refactoring for `SyncReasoner` and `StructuralReasoner` where we are planning to remove caching. A new function is also introduced which saves owl class expressions.

To install or upgrade:


pip install -U owlapy


What's Changed
* changing _values to frozenset to allow for hashing by LckyLke in https://github.com/dice-group/owlapy/pull/96
* save_owl_class_expressions and test included by Demirrr in https://github.com/dice-group/owlapy/pull/99
* Refactor structural reasoner by LckyLke in https://github.com/dice-group/owlapy/pull/100
* Test hashes by Demirrr in https://github.com/dice-group/owlapy/pull/102
* Refactoring sync reasoner by Demirrr in https://github.com/dice-group/owlapy/pull/105

New Contributors
* LckyLke made their first contribution in https://github.com/dice-group/owlapy/pull/96

**Full Changelog**: https://github.com/dice-group/owlapy/compare/1.3.2...1.3.3

1.3.2

We have a new early release this time where we have fixed/improved the DL and Manchester renderer and parser and made some fundamental refactoring to our oldest reasoners. Check the respective PRs for more details.

Install/Upgrade:


pip install -U owlapy


What's Changed
* Direct and Inverse Mappings Owlapy objects into DL syntax in string and Manchester syntax string by Demirrr in https://github.com/dice-group/owlapy/pull/90
* Refactoring on owl reasoners and some fixes/improvements by alkidbaci in https://github.com/dice-group/owlapy/pull/92


**Full Changelog**: https://github.com/dice-group/owlapy/compare/1.3.1...1.3.2

1.3.1

You can find more details in the PRs below.

Install/Upgrade:

pip install -U owlapy


What's Changed
* New terminal command by alkidbaci in https://github.com/dice-group/owlapy/pull/68
* Issues solving by alkidbaci in https://github.com/dice-group/owlapy/pull/72
* fixing issue with OWLNothing + new parameter for `OWLReasoner.instances` by alkidbaci in https://github.com/dice-group/owlapy/pull/73
* Removed unused jar files by alkidbaci in https://github.com/dice-group/owlapy/pull/76
* New methods for SyncOntology and SyncReasoner by alkidbaci in https://github.com/dice-group/owlapy/pull/77
* SPARQL query returning a confusion matrix by nkaralis in https://github.com/dice-group/owlapy/pull/83
* Confusion matrix query improvements by nkaralis in https://github.com/dice-group/owlapy/pull/85
* Owl sqarql refactoring by Demirrr in https://github.com/dice-group/owlapy/pull/84


**Full Changelog**: https://github.com/dice-group/owlapy/compare/1.3.0...1.3.1

1.3.0

Happy to share with you version 1.3.0 of owlapy. We present some new classes as well as some important changes. Feel free to read the highlights below.

As always you can upgrade using pip:


pip install -U owlapy


New
- Added new ontology manager: [SyncOntologyManager](https://dice-group.github.io/owlapy/autoapi/owlapy/owl_ontology_manager/index.html#owlapy.owl_ontology_manager.SyncOntologyManager).
- Added new ontology: [SyncOntology](https://dice-group.github.io/owlapy/autoapi/owlapy/owl_ontology/index.html#owlapy.owl_ontology.SyncOntology).
- Added new mappings in [OWLAPIMapper ](https://dice-group.github.io/owlapy/autoapi/owlapy/owlapi_mapper/index.html#owlapy.owlapi_mapper.OWLAPIMapper).
- Added new package [owlapy.abstracts](https://dice-group.github.io/owlapy/autoapi/owlapy/abstracts/index.html).
- Added _'Structural'_ reasoner as an new reasoner option for _SyncReasoner_.

Changes
- ***OWLAPIAdaptor is removed/disbanded***. Its methods are now moved directly to [SyncReasoner](https://dice-group.github.io/owlapy/autoapi/owlapy/owl_reasoner/index.html#owlapy.owl_reasoner.SyncReasoner).
- [OWLAPIMapper ](https://dice-group.github.io/owlapy/autoapi/owlapy/owlapi_mapper/index.html#owlapy.owlapi_mapper.OWLAPIMapper) is now initialized using `SyncOntology`.
- `SyncReasoner` and `SyncOntology` can now be initialized directly using the path of the ontology (instead of the IRI).
- Abstract classes [OWLReasoner](https://dice-group.github.io/owlapy/autoapi/owlapy/abstracts/abstract_owl_reasoner/index.html#owlapy.abstracts.abstract_owl_reasoner.OWLReasoner), [OWLReasonerEx](https://dice-group.github.io/owlapy/autoapi/owlapy/abstracts/abstract_owl_reasoner/index.html#owlapy.abstracts.abstract_owl_reasoner.OWLReasonerEx), [OWLOntology](https://dice-group.github.io/owlapy/autoapi/owlapy/abstracts/abstract_owl_ontology/index.html#owlapy.abstracts.abstract_owl_ontology.OWLOntology), [OWLOntologyManager](https://dice-group.github.io/owlapy/autoapi/owlapy/abstracts/abstract_owl_ontology_manager/index.html#owlapy.abstracts.abstract_owl_ontology_manager.OWLOntologyManager) and [OWLOntologyChange](https://dice-group.github.io/owlapy/autoapi/owlapy/abstracts/abstract_owl_ontology_manager/index.html#owlapy.abstracts.abstract_owl_ontology_manager.OWLOntologyChange) moved to subpackage [owlapy.abstracts](https://dice-group.github.io/owlapy/autoapi/owlapy/abstracts/index.html).
- 'add' and 'remove' axiom methods are moved from _OWLOntologyManager_ to _OWLOntology_. This comes with parameters changes. Check the docstrings.
- Signature changes on methods of OWLReasoner:
- The argument `only_named` is no longer a required argument of the abstract methods
- The argument `direct` is no longer required on the following methods: `data_property_values`, `object_property_values` and `all_data_property_values`.
- JPype start and stop functions moved to `owlapy/sync_functions.py`.

Docs
- Documentation updated in accordance.
- README updated in accordance.

PRs
62 64

**Full Changelog**: https://github.com/dice-group/owlapy/compare/1.2.1...1.3.0

1.2.1

OWL Reasoners for Type Inference and Ontology Enrichment

With OWLAPI integration, we can enjoy owlapi in python.
For instance, OWL Reasoners like 'HermiT' and 'Pellet' can be easily used to infer missing type information.

python
from owlapy.owl_ontology_manager import OntologyManager
from owlapy.owlapi_adaptor import OWLAPIAdaptor

ontology_path = "KGs/Family/family-benchmark_rich_background.owl"
Available OWL Reasoners: 'HermiT', 'Pellet', 'JFact', 'Openllet'
owlapi_adaptor = OWLAPIAdaptor(path=ontology_path, name_reasoner="Pellet")
onto = OntologyManager().load_ontology(ontology_path)
Iterate over defined owl Classes in the signature
for i in onto.classes_in_signature():
Performing type inference with Pellet
instances=owlapi_adaptor.instances(i,direct=False)
print(f"Class:{i}\t Num instances:{len(instances)}")
owlapi_adaptor.stopJVM()


What's Changed
* Merge to main v1.1.1 by alkidbaci in https://github.com/dice-group/owlapy/pull/50
* infer_save() implemented to infer different types of axioms by Demirrr in https://github.com/dice-group/owlapy/pull/52
* Owlapi adaptor changes and SyncReasoner update by alkidbaci in https://github.com/dice-group/owlapy/pull/53
* Owl to sentence by Demirrr in https://github.com/dice-group/owlapy/pull/56
* Added logo, bandages and more by alkidbaci in https://github.com/dice-group/owlapy/pull/57
* Owlapy mapper extension and infer methods of adapter by alkidbaci in https://github.com/dice-group/owlapy/pull/58
* Refactoring and Readme Update by Demirrr in https://github.com/dice-group/owlapy/pull/59
* New Release 1.2.1 by Demirrr in https://github.com/dice-group/owlapy/pull/61


**Full Changelog**: https://github.com/dice-group/owlapy/compare/1.1.1...1.2.1

1.2.0

pip install -U owlapy


What's Changed
Owlapi Adaptor extended: 52 53
- Added `infer_and_save` method which you can use to generate inferred class assertion axioms from the given ontology and saves them to a file.
- You can now use all the methods of the abstract class [OWLReasoner ](https://dice-group.github.io/owlapy/autoapi/owlapy/owl_reasoner/index.html#owlapy.owl_reasoner.OWLReasoner)from [OWLAPIAdaptor ](https://dice-group.github.io/owlapy/autoapi/owlapy/owlapi_adaptor/index.html#owlapy.owlapi_adaptor.OWLAPIAdaptor)or from an instance of [SyncReasoner](https://dice-group.github.io/owlapy/autoapi/owlapy/owl_reasoner/index.html#owlapy.owl_reasoner.SyncReasoner).

SyncReasoner updated: 53
- SyncReasoner is no longer depended on _owlready2_ but now syncs directly to an owlapi reasoner like HermiT, etc.
- Every implemented method of OWLReasoner now is forwarded to the synced reasoner.

2 new short form providers added for [DLSyntaxObjectRenderer](https://dice-group.github.io/owlapy/autoapi/owlapy/render/index.html#owlapy.render.DLSyntaxObjectRenderer): 56
- Added `translating_short_form_provider`. This is used for local ontologies mainly. Uses a reasoner to get the label value.
- Added `translating_short_form_endpoint`. This is used for triplestores . Given an endpoint and a set of rules it will provide the desired behavior using SPARQL queries.
- This providers enables the user to set rules for the representation value that will be used in a DL string after rendering.

Initialize using `partial` from `functools`:

python
from functools import partial

partial_provider = partial(translating_short_form_endpoint, endpoint="https://some_endpoint.com/sparql", rules={})
renderer = DLSyntaxObjectRenderer(short_form_provider=partial_provider)

Check the [docstrings](https://dice-group.github.io/owlapy/autoapi/owlapy/render/index.html#owlapy.render.translating_short_form_endpoint) for more details.


**Full Changelog**: https://github.com/dice-group/owlapy/compare/1.1.1...1.2.0

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.