ontor


Nameontor JSON
Version 0.4.10 PyPI version JSON
download
home_pagehttps://github.com/felixocker/ontor
Summaryontor - an ontology editor based on Owlready2
upload_time2022-12-23 16:47:36
maintainer
docs_urlNone
authorFelix Ocker
requires_python>=3.9
license
keywords ontology owl python knowledge graph
VCS
bugtrack_url
requirements alabaster astroid asttokens Babel backcall black certifi cfgv chardet click decorator distlib docutils executing filelock identify idna imagesize ipython ipython-genutils isodate isort jedi Jinja2 jsonpickle lark lazy-object-proxy MarkupSafe matplotlib-inline mccabe mypy mypy-extensions networkx nodeenv numpy Owlready2 packaging pandas parso pathspec pexpect pickleshare platformdirs pre-commit prompt-toolkit ptyprocess pure-eval Pygments pylint pyparsing python-dateutil pytz pyvis PyYAML rdflib requests six snowballstemmer Sphinx sphinxcontrib-applehelp sphinxcontrib-devhelp sphinxcontrib-htmlhelp sphinxcontrib-jsmath sphinxcontrib-qthelp sphinxcontrib-serializinghtml stack-data toml tomli traitlets typing-extensions urllib3 virtualenv wcwidth wrapt
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Current Release Version](https://img.shields.io/github/v/release/felixocker/ontor?logo=github)](https://github.com/felixocker/ontor/releases/)
[![Test and Build](https://img.shields.io/github/workflow/status/felixocker/ontor/test-and-build?logo=github)](https://github.com/felixocker/ontor/actions/workflows/publish-to-testpypi.yml)
[![Documentation Status](https://readthedocs.org/projects/felixocker-ontor/badge/?version=latest)](https://felixocker-ontor.readthedocs.io/en/latest/?badge=latest)
[![PyPI](https://img.shields.io/pypi/v/ontor)](https://pypi.org/project/ontor/)
[![License](https://img.shields.io/badge/license-GPLv3-blue)](https://www.gnu.org/licenses/gpl-3.0.html)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

<img src="https://github.com/felixocker/ontor/raw/main/docs/ontor-logo.svg" alt="ontor logo" width="500"/>

# ONTology editOR (ontor)
ontology editor built on [Owlready2](https://pypi.org/project/Owlready2/)

## functionality
each instance of the ontor class represents an individual ontology and provides support for:
* creating new, loading existing, and saving ontologies
* modifying ontologies:
  * import other ontologies
  * simply extract information such as axioms and class restrictions
  * insert classes, properties, instances, relations, and restrictions
  * insert general class axioms using a workaround for Owlready2
  * delete classes, properties, instances, relations, and restrictions but preserve the ontology's structure by reassigning subclasses and instances appropriately
* reasoning over ontologies and debugging by interactively deleting problematic axioms
* visualizing the entire ontology or selected parts thereof

ontor provides a tuple based syntax with JSON and CSV support for ontology editing to facilitate focusing on the ontology's content

## requirements and installation
* Python 3.9+
* install ontor using pip
  * from PyPI: ```pip install ontor```
  * from GitHub, in editable mode: ```pip install -e .```
* generate documentation via sphinx using the makefile in *docs/*: ```make html```

## demo

the directory *example/* includes a demo application inspired by [Protégé's pizza example](https://protegewiki.stanford.edu/wiki/Protege4Pizzas10Minutes)

### general class axioms
in addition to class axioms, General Class Axioms (GCAs) can express more complex statements - the generic axioms are equivalented using helper classes\
in the example, a uniform price of 5 is set for all pizzas with seafood toppings without making use of an explicitly defined class for these pizzas:\
```
[
  ["has_topping",null,"min",1,"seafood_topping",null,null,null,null,null,null,null,true],
  ["has_price",null,"value",null,null,"float",null,null,5,null,null,null,true]
]
```
this allows a reasoner to infer that the price for all instances of *seafood_pizza* as well as for the  instance *Another_pizza* is 5

### interactive debugging
interactively debug an ontology\
in the example: ```ontor3.debug_onto()```

<img src="https://github.com/felixocker/ontor/raw/main/docs/debug.gif" alt="interactive ontology debugging" width="500"/>

### visualization
visualize selected instances, classes, and properties in a given radius around a focus node; e.g., all nodes in a radius of two relations around the node "John"\
in the example: ```ontor3.visualize(classes=["human", "pizza"], properties=["likes", "diameter_in_cm"], focusnode="John", radius=2)```

<img src="https://github.com/felixocker/ontor/raw/main/docs/visualize.png" alt="visualize selected ontology parts" width="500"/>

### workflow

When creating ontologies from scratch, note that some functions have to be called in a specific order:
1. *add_taxo* - the taxonomy has to be created first to ensure that all classes are defined, which are required by the properties, axioms, and individuals
2. *add_ops*, *add_dps* - properties must be defined before axioms can be specified
3. *add_axioms*, *add_gcas*, *add_instances* - axioms and instances can only be added when all the necessary classes and properties have been defined

## license
GPL v3.0

## contact
Felix Ocker - [felix.ocker@googlemail.com](mailto:felix.ocker@googlemail.com)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/felixocker/ontor",
    "name": "ontor",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "ontology,owl,python,knowledge graph",
    "author": "Felix Ocker",
    "author_email": "felix.ocker@googlemail.com",
    "download_url": "https://files.pythonhosted.org/packages/7d/e0/0a7394f2f62a534892897d6a565d331082b639bce561af15625b4aba74d8/ontor-0.4.10.tar.gz",
    "platform": null,
    "description": "[![Current Release Version](https://img.shields.io/github/v/release/felixocker/ontor?logo=github)](https://github.com/felixocker/ontor/releases/)\n[![Test and Build](https://img.shields.io/github/workflow/status/felixocker/ontor/test-and-build?logo=github)](https://github.com/felixocker/ontor/actions/workflows/publish-to-testpypi.yml)\n[![Documentation Status](https://readthedocs.org/projects/felixocker-ontor/badge/?version=latest)](https://felixocker-ontor.readthedocs.io/en/latest/?badge=latest)\n[![PyPI](https://img.shields.io/pypi/v/ontor)](https://pypi.org/project/ontor/)\n[![License](https://img.shields.io/badge/license-GPLv3-blue)](https://www.gnu.org/licenses/gpl-3.0.html)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n<img src=\"https://github.com/felixocker/ontor/raw/main/docs/ontor-logo.svg\" alt=\"ontor logo\" width=\"500\"/>\n\n# ONTology editOR (ontor)\nontology editor built on [Owlready2](https://pypi.org/project/Owlready2/)\n\n## functionality\neach instance of the ontor class represents an individual ontology and provides support for:\n* creating new, loading existing, and saving ontologies\n* modifying ontologies:\n  * import other ontologies\n  * simply extract information such as axioms and class restrictions\n  * insert classes, properties, instances, relations, and restrictions\n  * insert general class axioms using a workaround for Owlready2\n  * delete classes, properties, instances, relations, and restrictions but preserve the ontology's structure by reassigning subclasses and instances appropriately\n* reasoning over ontologies and debugging by interactively deleting problematic axioms\n* visualizing the entire ontology or selected parts thereof\n\nontor provides a tuple based syntax with JSON and CSV support for ontology editing to facilitate focusing on the ontology's content\n\n## requirements and installation\n* Python 3.9+\n* install ontor using pip\n  * from PyPI: ```pip install ontor```\n  * from GitHub, in editable mode: ```pip install -e .```\n* generate documentation via sphinx using the makefile in *docs/*: ```make html```\n\n## demo\n\nthe directory *example/* includes a demo application inspired by [Prot\u00e9g\u00e9's pizza example](https://protegewiki.stanford.edu/wiki/Protege4Pizzas10Minutes)\n\n### general class axioms\nin addition to class axioms, General Class Axioms (GCAs) can express more complex statements - the generic axioms are equivalented using helper classes\\\nin the example, a uniform price of 5 is set for all pizzas with seafood toppings without making use of an explicitly defined class for these pizzas:\\\n```\n[\n  [\"has_topping\",null,\"min\",1,\"seafood_topping\",null,null,null,null,null,null,null,true],\n  [\"has_price\",null,\"value\",null,null,\"float\",null,null,5,null,null,null,true]\n]\n```\nthis allows a reasoner to infer that the price for all instances of *seafood_pizza* as well as for the  instance *Another_pizza* is 5\n\n### interactive debugging\ninteractively debug an ontology\\\nin the example: ```ontor3.debug_onto()```\n\n<img src=\"https://github.com/felixocker/ontor/raw/main/docs/debug.gif\" alt=\"interactive ontology debugging\" width=\"500\"/>\n\n### visualization\nvisualize selected instances, classes, and properties in a given radius around a focus node; e.g., all nodes in a radius of two relations around the node \"John\"\\\nin the example: ```ontor3.visualize(classes=[\"human\", \"pizza\"], properties=[\"likes\", \"diameter_in_cm\"], focusnode=\"John\", radius=2)```\n\n<img src=\"https://github.com/felixocker/ontor/raw/main/docs/visualize.png\" alt=\"visualize selected ontology parts\" width=\"500\"/>\n\n### workflow\n\nWhen creating ontologies from scratch, note that some functions have to be called in a specific order:\n1. *add_taxo* - the taxonomy has to be created first to ensure that all classes are defined, which are required by the properties, axioms, and individuals\n2. *add_ops*, *add_dps* - properties must be defined before axioms can be specified\n3. *add_axioms*, *add_gcas*, *add_instances* - axioms and instances can only be added when all the necessary classes and properties have been defined\n\n## license\nGPL v3.0\n\n## contact\nFelix Ocker - [felix.ocker@googlemail.com](mailto:felix.ocker@googlemail.com)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "ontor - an ontology editor based on Owlready2",
    "version": "0.4.10",
    "split_keywords": [
        "ontology",
        "owl",
        "python",
        "knowledge graph"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "4a0df0d94edda62d3585bd2f0ea68735",
                "sha256": "c0dec61297e0d1dba7d9598c38ccf19859595875b5495e7db7a998d32e8eece6"
            },
            "downloads": -1,
            "filename": "ontor-0.4.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4a0df0d94edda62d3585bd2f0ea68735",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 34484,
            "upload_time": "2022-12-23T16:47:35",
            "upload_time_iso_8601": "2022-12-23T16:47:35.323174Z",
            "url": "https://files.pythonhosted.org/packages/a2/eb/d289b096a76abc7d4d6d9440090a718112f5e72814f4eaff5407db2575e1/ontor-0.4.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "834fffb21489e3bad55c6ded6682a622",
                "sha256": "5af833d4a0d0f958c085b63c55c74b33914607927e20a97ba7e9a8b903976126"
            },
            "downloads": -1,
            "filename": "ontor-0.4.10.tar.gz",
            "has_sig": false,
            "md5_digest": "834fffb21489e3bad55c6ded6682a622",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 33593,
            "upload_time": "2022-12-23T16:47:36",
            "upload_time_iso_8601": "2022-12-23T16:47:36.347286Z",
            "url": "https://files.pythonhosted.org/packages/7d/e0/0a7394f2f62a534892897d6a565d331082b639bce561af15625b4aba74d8/ontor-0.4.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-23 16:47:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "felixocker",
    "github_project": "ontor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "alabaster",
            "specs": [
                [
                    "==",
                    "0.7.12"
                ]
            ]
        },
        {
            "name": "astroid",
            "specs": [
                [
                    "==",
                    "2.8.4"
                ]
            ]
        },
        {
            "name": "asttokens",
            "specs": [
                [
                    "==",
                    "2.0.5"
                ]
            ]
        },
        {
            "name": "Babel",
            "specs": [
                [
                    "==",
                    "2.9.1"
                ]
            ]
        },
        {
            "name": "backcall",
            "specs": [
                [
                    "==",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    "==",
                    "22.10.0"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2020.12.5"
                ]
            ]
        },
        {
            "name": "cfgv",
            "specs": [
                [
                    "==",
                    "3.3.1"
                ]
            ]
        },
        {
            "name": "chardet",
            "specs": [
                [
                    "==",
                    "4.0.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.3"
                ]
            ]
        },
        {
            "name": "decorator",
            "specs": [
                [
                    "==",
                    "4.4.2"
                ]
            ]
        },
        {
            "name": "distlib",
            "specs": [
                [
                    "==",
                    "0.3.6"
                ]
            ]
        },
        {
            "name": "docutils",
            "specs": [
                [
                    "==",
                    "0.17.1"
                ]
            ]
        },
        {
            "name": "executing",
            "specs": [
                [
                    "==",
                    "0.8.2"
                ]
            ]
        },
        {
            "name": "filelock",
            "specs": [
                [
                    "==",
                    "3.8.0"
                ]
            ]
        },
        {
            "name": "identify",
            "specs": [
                [
                    "==",
                    "2.5.8"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "2.10"
                ]
            ]
        },
        {
            "name": "imagesize",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "ipython",
            "specs": [
                [
                    "==",
                    "8.0.1"
                ]
            ]
        },
        {
            "name": "ipython-genutils",
            "specs": [
                [
                    "==",
                    "0.2.0"
                ]
            ]
        },
        {
            "name": "isodate",
            "specs": [
                [
                    "==",
                    "0.6.0"
                ]
            ]
        },
        {
            "name": "isort",
            "specs": [
                [
                    "==",
                    "5.9.3"
                ]
            ]
        },
        {
            "name": "jedi",
            "specs": [
                [
                    "==",
                    "0.18.0"
                ]
            ]
        },
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "3.0.1"
                ]
            ]
        },
        {
            "name": "jsonpickle",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "lark",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "lazy-object-proxy",
            "specs": [
                [
                    "==",
                    "1.6.0"
                ]
            ]
        },
        {
            "name": "MarkupSafe",
            "specs": [
                [
                    "==",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "matplotlib-inline",
            "specs": [
                [
                    "==",
                    "0.1.2"
                ]
            ]
        },
        {
            "name": "mccabe",
            "specs": [
                [
                    "==",
                    "0.6.1"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    "==",
                    "0.910"
                ]
            ]
        },
        {
            "name": "mypy-extensions",
            "specs": [
                [
                    "==",
                    "0.4.3"
                ]
            ]
        },
        {
            "name": "networkx",
            "specs": [
                [
                    "==",
                    "2.5.1"
                ]
            ]
        },
        {
            "name": "nodeenv",
            "specs": [
                [
                    "==",
                    "1.7.0"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.23.0"
                ]
            ]
        },
        {
            "name": "Owlready2",
            "specs": [
                [
                    "==",
                    "0.33"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "21.0"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "parso",
            "specs": [
                [
                    "==",
                    "0.8.2"
                ]
            ]
        },
        {
            "name": "pathspec",
            "specs": [
                [
                    "==",
                    "0.9.0"
                ]
            ]
        },
        {
            "name": "pexpect",
            "specs": [
                [
                    "==",
                    "4.8.0"
                ]
            ]
        },
        {
            "name": "pickleshare",
            "specs": [
                [
                    "==",
                    "0.7.5"
                ]
            ]
        },
        {
            "name": "platformdirs",
            "specs": [
                [
                    "==",
                    "2.4.0"
                ]
            ]
        },
        {
            "name": "pre-commit",
            "specs": [
                [
                    "==",
                    "2.20.0"
                ]
            ]
        },
        {
            "name": "prompt-toolkit",
            "specs": [
                [
                    "==",
                    "3.0.19"
                ]
            ]
        },
        {
            "name": "ptyprocess",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "pure-eval",
            "specs": [
                [
                    "==",
                    "0.2.2"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.9.0"
                ]
            ]
        },
        {
            "name": "pylint",
            "specs": [
                [
                    "==",
                    "2.11.1"
                ]
            ]
        },
        {
            "name": "pyparsing",
            "specs": [
                [
                    "==",
                    "2.4.7"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.8.2"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2021.1"
                ]
            ]
        },
        {
            "name": "pyvis",
            "specs": [
                [
                    "==",
                    "0.1.9"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0"
                ]
            ]
        },
        {
            "name": "rdflib",
            "specs": [
                [
                    "==",
                    "5.0.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.25.1"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.15.0"
                ]
            ]
        },
        {
            "name": "snowballstemmer",
            "specs": [
                [
                    "==",
                    "2.1.0"
                ]
            ]
        },
        {
            "name": "Sphinx",
            "specs": [
                [
                    "==",
                    "4.1.1"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-applehelp",
            "specs": [
                [
                    "==",
                    "1.0.2"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-devhelp",
            "specs": [
                [
                    "==",
                    "1.0.2"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-htmlhelp",
            "specs": [
                [
                    "==",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-jsmath",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-qthelp",
            "specs": [
                [
                    "==",
                    "1.0.3"
                ]
            ]
        },
        {
            "name": "sphinxcontrib-serializinghtml",
            "specs": [
                [
                    "==",
                    "1.1.5"
                ]
            ]
        },
        {
            "name": "stack-data",
            "specs": [
                [
                    "==",
                    "0.1.4"
                ]
            ]
        },
        {
            "name": "toml",
            "specs": [
                [
                    "==",
                    "0.10.2"
                ]
            ]
        },
        {
            "name": "tomli",
            "specs": [
                [
                    "==",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "traitlets",
            "specs": [
                [
                    "==",
                    "5.0.5"
                ]
            ]
        },
        {
            "name": "typing-extensions",
            "specs": [
                [
                    "==",
                    "3.10.0.2"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "1.26.6"
                ]
            ]
        },
        {
            "name": "virtualenv",
            "specs": [
                [
                    "==",
                    "20.16.6"
                ]
            ]
        },
        {
            "name": "wcwidth",
            "specs": [
                [
                    "==",
                    "0.2.5"
                ]
            ]
        },
        {
            "name": "wrapt",
            "specs": [
                [
                    "==",
                    "1.13.2"
                ]
            ]
        }
    ],
    "lcname": "ontor"
}
        
Elapsed time: 0.02538s