Skip to content

Releases: dice-group/owlapy

owlapy 1.3.0

10 Sep 13:01
Compare
Choose a tag to compare

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

Changes

  • OWLAPIAdaptor is removed/disbanded. Its methods are now moved directly to SyncReasoner.
  • 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, 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 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: 1.2.1...1.3.0

owlapy 1.2.1

22 Aug 10:34
3f6f75e
Compare
Choose a tag to compare

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

Full Changelog: 1.1.1...1.2.1

owlapy 1.2.0

06 Aug 13:52
Compare
Choose a tag to compare

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 from functools:

    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

15 Jul 11:45
a619e2c
Compare
Choose a tag to compare

Happy to share this new release where we added owlapi adaptor.

Update/install:

pip install -U owlapy

What's Changed

  • Added owlapi adaptor in #46
    • Refactoring of owlapi adaptor: #47 #49

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

27 May 12:44
Compare
Choose a tag to compare

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 to utils.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 and SyncReasoner.

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

03 May 19:01
5994940
Compare
Choose a tag to compare

We're happy to announce the new release - owlapy 1.0.2.

You can install/update using pip install -U owlapy.

What's Changed

Full Changelog: 1.0.0...1.0.2

owlapy 1.0.0

19 Apr 12:49
ea48dc9
Compare
Choose a tag to compare

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 from HasIRI is now completely removed. OWL classes that inherit from HasIRI contain 2 new parameters iri (to get the IRI - used instead of get_iri() ) and str (to get string representation of that IRI)
  • model module is removed.
  • added modules: owl_ontology, owl_ontology_manager and owl_reasoning, each has respective classes that were previously located in model module.
  • providers.py is moved directly under owlapy. Naming of the methods of this module is changed from PascalCase to sneak_case.
  • removed module owl2sparql. owl2sparql.converter.py is now moved directly under owlapy module.
  • removed module data_ranges, added owl_data_ranges instead.
  • renamed types.py to owl_datatype.py.
  • renamed owlobject.py to owl_object.py.
  • moved class HasIndex from has.py to util.py. Removed has.py.
  • moved method move (renamed from MOVE) from _utils.py to util.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 from owlapy.

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 and manchester_to_owl_expression you can now pass the namespace argument which is required to successfully parse the given expression.

Full Changelog: 0.1.3...1.0.0

owlapy 0.1.3

10 Apr 10:57
8ee155b
Compare
Choose a tag to compare

owlapy 0.1.3

We're happy to announce the 0.13 release. You can install it with pip install -U owlapy

What's Changed

Full Changelog: 0.1.2...0.1.3

owlapy 0.1.2

28 Mar 11:57
6f758d4
Compare
Choose a tag to compare

owlapy 0.1.2

We're happy to announce the 0.12 release. You can install it with pip install -U owlapy

What's Changed

  • owl2sparql conversion by @alkidbaci in #5
  • Github Action added and str property added for few classes by @Demirrr in #6
  • TODOs are added for the next release by @Demirrr in #7
  • setup.py already installs dependencies by @Demirrr in #8
  • New Release by @Demirrr in #9

New Contributors

Full Changelog: https://github.com/dice-group/owlapy/commits/0.1.2