Skip to main content

ontor - an ontology editor based on Owlready2

Project description

Build Status Documentation Status PyPI License

ONTology editOR (ontor)

ontology editor built on 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
    • 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

interactively debug an ontology
in the example: ontor3.debug_onto()

interactive ontology debugging

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)

visualize selected ontology parts

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_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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ontor-0.3.0.tar.gz (30.8 kB view hashes)

Uploaded Source

Built Distribution

ontor-0.3.0-py3-none-any.whl (31.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page