KRR-Oxford / DeepOnto

A package for ontology engineering with deep learning and language models.
https://krr-oxford.github.io/DeepOnto/
Apache License 2.0
174 stars 11 forks source link
deep-learning language-model ontologies ontology-engineering owlapi

deeponto

license docs pypi

A package for ontology engineering with deep learning.

News :newspaper:

Check the complete changelog and FAQs. The FAQs page does not contain much information now but will be updated according to feedback.

About

$\textsf{DeepOnto}$ aims to provide building blocks for implementing deep learning models, constructing resources, and conducting evaluation for various ontology engineering purposes.

Installation

OWLAPI

$\textsf{DeepOnto}$ relies on OWLAPI version 4.5.22 (written in Java) for ontologies.

We follow what has been implemented in mOWL that uses JPype to bridge Python and Java Virtual Machine (JVM). Please check JPype's installation page for successful JVM initialisation.

Pytorch

$\textsf{DeepOnto}$ relies on Pytorch for deep learning framework.

We recommend installing Pytorch prior to installing $\textsf{DeepOnto}$ following the commands listed on the Pytorch webpage. Notice that users can choose either GPU (with CUDA) or CPU version of Pytorch.

In case the most recent Pytorch version causes any incompatibility issues, use the following command (with CUDA 11.6) known to work:

pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116

Basic usage of $\textsf{DeepOnto}$ does not rely on GPUs, but for efficient deep learning model training, please make sure torch.cuda.is_available() returns True.

Install from PyPI

Other dependencies are specified in setup.cfg and requirements.txt which are supposed to be installed along with deeponto.

# requiring Python>=3.8
pip install deeponto

We have been informed that openprompt has a conflict with several other packages that can be hardly addressed on MacOS with M1, so we now set it as an optional dependency. However, it is main dependency of the OntoLAMA code at deeponto.complete.ontolama. To use OntoLAMA, please install openprompt separately, or use the following command to install $\textsf{DeepOnto}$:

pip install deeponto[ontolama]

Install from Git Repository

To install the latest, probably unreleased version of deeponto, you can directly install from the repository.

pip install git+https://github.com/KRR-Oxford/DeepOnto.git

Main Features

deeponto

Figure: Illustration of DeepOnto's architecture.

Ontology Processing

The base class of $\textsf{DeepOnto}$ is [Ontology][deeponto.onto.Ontology], which serves as the main entry point for introducing the OWLAPI's features, such as accessing ontology entities, querying for ancestor/descendent (and parent/child) concepts, deleting entities, modifying axioms, and retrieving annotations. See quick usage at load an ontology. Along with these basic functionalities, several essential sub-modules are built to enhance the core module, including the following:

Tools and Resources

Individual tools and resources are implemented based on the core ontology processing module. Currently, $\textsf{DeepOnto}$ supports the following:

License

!!! license "License"

Copyright 2021-2023 Yuan He.
Copyright 2023 Yuan He, Jiaoyan Chen.
All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at *<http://www.apache.org/licenses/LICENSE-2.0>*

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Citation

The preprint of our system paper for $\textsf{DeepOnto}$ is currently available at arxiv.

Yuan He, Jiaoyan Chen, Hang Dong, Ian Horrocks, Carlo Allocca, Taehun Kim, and Brahmananda Sapkota. DeepOnto: A Python Package for Ontology Engineering with Deep Learning. arXiv preprint arXiv:2307.03067 (2023).

Our paper has been accepted by the Semantic Web Journal.

!!! credit "Citation"

```
@article{he2023deeponto,
  title={DeepOnto: A Python Package for Ontology Engineering with Deep Learning},
  author={He, Yuan and Chen, Jiaoyan and Dong, Hang and Horrocks, Ian and Allocca, Carlo and Kim, Taehun and Sapkota, Brahmananda},
  journal={arXiv preprint arXiv:2307.03067},
  year={2023}
}
```

Relevant Publications


Please report any bugs or queries by raising a GitHub issue or sending emails to the maintainers (Yuan He or Jiaoyan Chen) through:

first_name.last_name@cs.ox.ac.uk