Ontolearn

Latest version: v0.7.1

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

Scan your dependencies

0.7.0

Release Notes:

Drill is now available in Ontolearn:

You can import it as follows:
python
from ontolearn.learners import Drill


Examples:
1. [examples/concept_learning_evaluation.py](https://github.com/dice-group/Ontolearn/blob/develop/examples/concept_learning_evaluation.py)
2. [examples/concept_learning_cv_evaluation.py](https://github.com/dice-group/Ontolearn/blob/develop/examples/concept_learning_cv_evaluation.py)

---------------------------------------------------

Tree-based DL Learner (tDL) is now available in Ontolearn:

You can import it as follows:
python
from ontolearn.learners import TDL

Examples:
1. [examples/concept_learning_evaluation.py](https://github.com/dice-group/Ontolearn/blob/develop/examples/concept_learning_evaluation.py)
2. [examples/concept_learning_cv_evaluation.py](https://github.com/dice-group/Ontolearn/blob/develop/examples/concept_learning_cv_evaluation.py)
3. [examples/concept_learning_with_tdl_and_triplestore_kb.py](https://github.com/dice-group/Ontolearn/blob/develop/examples/concept_learning_with_tdl_and_triplestore_kb.py)

---------------------------------------------------


CLIP is now available in Ontolearn:

You can import it as follows:
python
from ontolearn.concept_learner import CLIP


Examples:
1. [examples/concept_learning_cv_evaluation.py](https://github.com/dice-group/Ontolearn/blob/develop/examples/concept_learning_cv_evaluation.py)


---------------------------------------------------

Changes to KnowledgeBase class:

- You can make type retrieval methods to return the type of OWLNamedIndividual for individuals which do not explicitly specify that type. You can do that by setting the argument `include_implicit_individuals` of class `KnowledgeBase` to `True`. By default it is `False`.
- Ontology and reasoner can be accessed directly:
- From `kb.ontology()` → To `kb.ontology`
- From `kb.reasoner()` → To `kb.reasoner`
- Added methods for triple retrieval:
- `abox` → returns all related Abox axioms of a given individual, list of individuals or None (all Abox axioms).
- `tbox` → method returns all related Tbox axioms of a given concept, data property, object property, a list of them or None (all Tbox axioms)
- `triples` → returns all triples of the ontology.

Return type in 3 formats defined by the `mode` argument which accepts the following strings:
1) `'native'` -> triples are represented as tuples of owlapy objects.
2) `'iri'` -> triples are represented as tuples of IRIs as strings.
3) `'axiom'` -> triples are represented as owlapy axioms.

- New property methods to retrieve classes/properties:
- `concepts`
- `object_properties`
- `object_properties`

- Removed triplestore logic (as well as from OWLOntology_Owlready2 and OWLReasoner_Owlready2). It is now moved to `ontolearn.triple_store` (described below).

Check everything [here](https://ontolearn-docs-dice-group.netlify.app/autoapi/ontolearn/knowledge_base/)

---------------------------------------------------

Triple Store Knowledge Base:

Added `TripleStoreOntology`, `TripleStoreReasoner` and `TripleStoreKnowledgeBase`.
`TripleStoreKnowledgeBase` can be initialized using just an SPARQL endpoint and it can be used instead of the `KnowledgeBase`
to execute a concept learner. All dataset queries are made using SPARQL and are directed to the provided endpoint.

To import:

python
from ontolearn.triple_store import TripleStoreOntology, TripleStoreReasoner, TripleStoreKnowledgeBase


For more, you can visit the guide in our documentation [here](https://ontolearn-docs-dice-group.netlify.app/usage/06_concept_learners#use-triplestore-knowledge-base) , check the [API docs](https://ontolearn-docs-dice-group.netlify.app/autoapi/ontolearn/triple_store/) and see the examples listed below.

Examples:
1. [examples/concept_learning_via_triplestore_example.py](https://github.com/dice-group/Ontolearn/blob/develop/examples/concept_learning_via_triplestore_example.py)
2. [examples/concept_learning_with_tdl_and_triplestore_kb.py](https://github.com/dice-group/Ontolearn/blob/develop/examples/concept_learning_with_tdl_and_triplestore_kb.py)

---------------------------------------------------


Documentation and more:

- At [README.md](https://github.com/dice-group/Ontolearn/blob/master/README.md) you can find the _Benchmark Results_ which displays the performance of all our learners.

- Documentation has been updated to the latest changes. You can always access the up-to-date documentation [here](https://ontolearn-docs-dice-group.netlify.app/usage/01_introduction).

- [Ontosample](https://ontolearn-docs-dice-group.netlify.app/autoapi/ontosample/) is now integrated into Ontolearn. We have also added a [guide](https://ontolearn-docs-dice-group.netlify.app/usage/04_knowledge_base#sampling-the-knowledge-base) on how to use it as well as an [example](https://github.com/dice-group/Ontolearn/blob/develop/examples/sampling_example.py).

_Note: `ontosample` is not part of the default dependencies. To get it you should either install it directly or use:_ `pip install ontolearn[full]`.

---------------------------------------------------

Changes on dependencies:
- We have added some new dependencies and increased the minimum required version for some of them.
- Some dependencies are made optional. You can now install all of them or just the minimum required ones.
- `pip install ontolearn[min]` → the default one when you execute `pip install ontolearn`
- `pip install ontolearn[full]` → to install the extra dependenices.
You can check them [here](https://github.com/dice-group/Ontolearn/blob/master/setup.py).


---------------------------------------------------

Bug Fixes and others:

- Fixed a bug where using the same EvoLearner model to fit more than one learning problem would cause quality drop.
- Added learning problem generator as Python module
- Other minor changes that in case you are interested, you can check the [PRs comments](https://github.com/dice-group/Ontolearn/pulls?q=is%3Apr+is%3Aclosed).

---------------------------------------------------


As always you can upgrade with pip:


pip install -U ontolearn


_Brought to you by Ontolearn Team._

0.6.1

We're happy to announce the 0.6.1 release.

You can upgrade with pip as usual:

`pip install -U ontolearn`

0.5.4

We're happy to announce the 0.5.4 release.

You can upgrade with pip as usual:

`pip install -U ontolearn`

0.5.3

We're happy to announce the 0.5.3 release.

You can upgrade with pip as usual:

`pip install -U ontolearn`

0.5.2

Features
- Properly check domain inclusion in the ConceptGenerator
- Add Top-Level CNF/DNF conversion

Fixes
- Fix OCEL (still not equivalent of the DL-Learner implementation)
- Fix a bug in the DLSyntaxParser to correctly parse Thing/Nothing
- Multiple fits for EvoLearner on datasets with data properties
- Correctly filter super properties in the OWLReasoner_Owlready2

Maintenance
- Use closed world behaviour for negations per default (FastInstanceChecker)

Todos for the next release
- Integrate (https://gradio.app/quickstart/) as done in https://github.com/dice-group/dice-embeddings. By this, we can increase the usability of our framework (CD).
- Remove ontolearn/endpoint as an endpoint does not belong to ontolearn but a particular application of it (CD).
- Update https://ontolearn-docs-dice-group.netlify.app/ (CD).
- Allow classification of new individuals that are not part of the existing knowledge base (213, 233) (LB).
- Add support for sub-properties to the FastInstanceChecker/OWLReasoner_Owlready2 (as an option) (LB).

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.