Releases: dice-group/owlapy
owlapy 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 #96
- save_owl_class_expressions and test included by @Demirrr in #99
- Refactor structural reasoner by @LckyLke in #100
- Test hashes by @Demirrr in #102
- Refactoring sync reasoner by @Demirrr in #105
New Contributors
Full Changelog: 1.3.2...1.3.3
owlapy 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 #90
- Refactoring on owl reasoners and some fixes/improvements by @alkidbaci in #92
Full Changelog: 1.3.1...1.3.2
owlapy 1.3.1
Version 1.3.1 is now out where some fixes and refactoring has been made as well as some new features are introduced.
You can find more details in the PRs below.
Install/Upgrade:
pip install -U owlapy
What's Changed
- New terminal command by @alkidbaci in #68
- Issues solving by @alkidbaci in #72
- fixing issue with OWLNothing + new parameter for
OWLReasoner.instances
by @alkidbaci in #73 - Removed unused jar files by @alkidbaci in #76
- New methods for SyncOntology and SyncReasoner by @alkidbaci in #77
- SPARQL query returning a confusion matrix by @nkaralis in #83
- Confusion matrix query improvements by @nkaralis in #85
- Owl sqarql refactoring by @Demirrr in #84
Full Changelog: 1.3.0...1.3.1
owlapy 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.
- Added new ontology: SyncOntology.
- Added new mappings in OWLAPIMapper .
- Added new package owlapy.abstracts.
- Added 'Structural' reasoner as an new reasoner option for SyncReasoner.
Changes
- OWLAPIAdaptor is removed/disbanded. Its methods are now moved directly to SyncReasoner.
- OWLAPIMapper is now initialized using
SyncOntology
. SyncReasoner
andSyncOntology
can now be initialized directly using the path of the ontology (instead of the IRI).- Abstract classes OWLReasoner, OWLReasonerEx, OWLOntology, OWLOntologyManager and OWLOntologyChange moved to subpackage owlapy.abstracts.
- '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
andall_data_property_values
.
- The argument
- JPype start and stop functions moved to
owlapy/sync_functions.py
.
Docs
- Documentation updated in accordance.
- README updated in accordance.
PRs
Full Changelog: 1.2.1...1.3.0
owlapy 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.
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 #50
- infer_save() implemented to infer different types of axioms by @Demirrr in #52
- Owlapi adaptor changes and SyncReasoner update by @alkidbaci in #53
- Owl to sentence by @Demirrr in #56
- Added logo, bandages and more by @alkidbaci in #57
- Owlapy mapper extension and infer methods of adapter by @alkidbaci in #58
- Refactoring and Readme Update by @Demirrr in #59
- New Release 1.2.1 by @Demirrr in #61
Full Changelog: 1.1.1...1.2.1
owlapy 1.2.0
New release is out: owlapy 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 from OWLAPIAdaptor or from an instance of 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: #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
fromfunctools
: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 for more details.
Full Changelog: 1.1.1...1.2.0
owlapy 1.1.1
Happy to share this new release where we added owlapi adaptor.
Update/install:
pip install -U owlapy
What's Changed
About OWLAPIAdaptor
This class serves as a bridge between owlapi and owlapy. You can now directly use reasoners such as HermiT , Pellet etc., to retrieve instances for a given class expression in a given ontology. Please check the documentation and the example for more details on what the adaptor offers.
We will continue to improve this adaptor in the future release.
Full Changelog: 1.1.0...1.1.1
owlapy 1.1.0
We're happy to announce the new release - owlapy 1.1.0.
You can install/update using pip install -U owlapy
.
What's Changed
- License updated to MIT License by @alkidbaci in 94e2809.
- New module
owl_hierarchy.py
(expressing OWL hierarchy) and extra utils method which are now all moved toutils.py
are added by @alkidbaci in #38. - An alternative for the ForAll mapping based on De Morgan's laws is introduced to owl2sparql converter by @nkaralis in #39 .
- New examples and modules added and some refactoring changes by @alkidbaci in #41 .
- Classes for ontology manipulation added by @alkidbaci in #42 .
- Ontology representation class:
owlapy.owl_ontology.Ontology
. - Ontology manager class for managing ontologies:
owlapy.owl_ontology_manager.OntologyManager
. - 3 ontology reasoner classes for reasoning over ontologies in owlapy/owl_reasoner:
OntologyReasoner
,FastInstanceCheckerReasoner
andSyncReasoner
.
- Ontology representation class:
Documentation for ontology manipulation will be added soon.
Edit: Documentation is now added. Check also the examples.
Full Changelog: 1.0.2...1.1.0
owlapy 1.0.2
We're happy to announce the new release - owlapy 1.0.2.
You can install/update using pip install -U owlapy
.
What's Changed
- Fixed bug by @alkidbaci in #28
- Issues solved by @alkidbaci in #32
- Release by @Demirrr in #36
Full Changelog: 1.0.0...1.0.2
owlapy 1.0.0
We're happy to announce the new release - owlapy 1.0.0.
You can install/update using pip install -U owlapy
.
What's Changed
API refactoring changes:
- IMPORTANT: Method
get_iri()
for classes which inherit fromHasIRI
is now completely removed. OWL classes that inherit fromHasIRI
contain 2 new parametersiri
(to get the IRI - used instead ofget_iri()
) andstr
(to get string representation of that IRI) model
module is removed.- added modules:
owl_ontology
,owl_ontology_manager
andowl_reasoning
, each has respective classes that were previously located inmodel
module. providers.py
is moved directly underowlapy
. Naming of the methods of this module is changed from PascalCase to sneak_case.- removed module
owl2sparql
.owl2sparql.converter.py
is now moved directly underowlapy
module. - removed module
data_ranges
, addedowl_data_ranges
instead. - renamed
types.py
toowl_datatype.py
. - renamed
owlobject.py
toowl_object.py
. - moved class
HasIndex
fromhas.py
toutil.py
. Removedhas.py
. - moved method
move
(renamed fromMOVE
) from_utils.py
toutil.py
. Removed_utils.py
. - conversion methods including:
owl_expression_to_dl
,owl_expression_to_manchester
,dl_to_owl_expression
,manchester_to_owl_expression
,owl_expression_to_sparql
can now be imported directly fromowlapy
.
Documentation Changes:
- Changed docstrings for owl classes that correspond to entities from OWL 2 Specification according to description found in the specification. Link to the description is also included for each class in case someone is interested to read more.
- Added "About" page in documentation.
- Added "Usage" guide in documentation, showing the essence of owlapy through concrete examples.
Bug fixes:
- fixed a bug where converting an
OWLDataCardinalityRestriction
expression to sparql the corresponding method would check for Object restrictions instead of Data restrictions. - for parser methods:
dl_to_owl_expression
andmanchester_to_owl_expression
you can now pass thenamespace
argument which is required to successfully parse the given expression.
Full Changelog: 0.1.3...1.0.0