gavel-tool / python-gavel-owl

GNU Affero General Public License v3.0
3 stars 1 forks source link

======== Overview

.. start-badges

.. list-table:: :stub-columns: 1

* - docs
  - |docs|
* - tests
  - | |travis| |requires|
    |
* - package
  - | |version| |wheel| |supported-versions| |supported-implementations|
    | |commits-since|

.. |docs| image:: https://readthedocs.org/projects/python-gavel-owl/badge/?style=flat :target: https://readthedocs.org/projects/python-gavel-owl :alt: Documentation Status

.. |travis| image:: https://api.travis-ci.org/gavel-tool/python-gavel-owl.svg?branch=master :alt: Travis-CI Build Status :target: https://travis-ci.org/gavel-tool/python-gavel-owl

.. |requires| image:: https://requires.io/github/gavel-tool/python-gavel-owl/requirements.svg?branch=master :alt: Requirements Status :target: https://requires.io/github/gavel-tool/python-gavel-owl/requirements/?branch=master

.. |version| image:: https://img.shields.io/pypi/v/gavel-owl.svg :alt: PyPI Package latest release :target: https://pypi.org/project/gavel-owl

.. |wheel| image:: https://img.shields.io/pypi/wheel/gavel-owl.svg :alt: PyPI Wheel :target: https://pypi.org/project/gavel-owl

.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/gavel-owl.svg :alt: Supported versions :target: https://pypi.org/project/gavel-owl

.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/gavel-owl.svg :alt: Supported implementations :target: https://pypi.org/project/gavel-owl

.. |commits-since| image:: https://img.shields.io/github/commits-since/gavel-tool/python-gavel-owl/v0.0.0.svg :alt: Commits since latest release :target: https://github.com/gavel-tool/python-gavel-owl/compare/v0.0.0...master

.. end-badges

An extension for Gavel introducing OWL and FOWL (OWL with FOL annotations) translations as well as related functionality regarding OWL and FOWL ontologies.

Installation

The latest released version can be installed with::

pip install gavel-owl

The latest development version can be installed with::

pip install git+https://github.com/gavel-tool/python-gavel-owl.git@dev

For the development version, you need to install the jar-file manually. This is done by running mvn install in the java directory. Copy the resulting jar-file from java/target/java-1.0-SNAPSHOT.one-jar.jar to src/gavel_owl/jars/api.jar (be sure to use the one-jar-file, not the regular jar-file).

Usage

This plugin extends gavel by two new dialects, owl and fowl. This enables the various features of gavel to be used with owl / fowl ontologies. These functionalities use the java-based OWL-API. Therefore, you have to start the java backend in order to use most owl-based functionalities. The gavel-owl plugin provides a single command to do that::

python -m gavel start-server

After the server has been started successfully, you can translate an existing owl ontology to first-order logic in tptp syntax using::

python -m gavel translate owl tptp your-ontology.owl

You can also submit arguments to fist-order prover Vampire consisting of the translation of a given owl ontology as premises and conjectures formulated in tptp using::

python -m gavel owl-prove your-premises.owl your-conjectures.tptp

In order to translate an owl ontology with first-order annotations into tptp syntax, you can use::

python -m gavel translate fowl tptp your-ontology.owl

The running java backend can be terminated::

python -m gavel stop-server

There are several commands available that can be accessed via::

python -m gavel COMMAND [ARGUMENTS]

For further options use::

python -m gavel [COMMAND] --help

Development

To run all the tests run::

tox

Note, to combine the coverage data from all the tox environments run:

.. list-table:: :widths: 10 90 :stub-columns: 1

- - Windows
  - ::

        set PYTEST_ADDOPTS=--cov-append
        tox

- - Other
  - ::

        PYTEST_ADDOPTS=--cov-append tox