🤖 AI Summary
To address the weak Python ecosystem for OWL 2 ontology engineering—characterized by poor format interoperability and complex reasoning integration—this paper proposes and implements OntoPy, a lightweight, modular Python framework for ontology development. OntoPy supports declarative ontology construction, dynamic modification, and serialization to multiple formats (RDF/XML, Turtle, JSON-LD). It introduces a unified interface enabling seamless coordination between native Python reasoners (e.g., OWL-RL) and external Java-based reasoners (e.g., HermiT, Pellet). A key innovation is bidirectional translation among description logic (DL) expressions, Manchester Syntax, and SPARQL patterns for OWL class definitions. Additionally, OntoPy provides an LLM-extensible workflow plugin mechanism. The framework is open-source (GitHub/PyPI) and has garnered over 50,000 downloads, significantly improving ontology modeling efficiency and cross-stack interoperability.
📝 Abstract
In this paper, we introduce OWLAPY, a comprehensive Python framework for OWL ontology engineering. OWLAPY streamlines the creation, modification, and serialization of OWL 2 ontologies. It uniquely integrates native Python-based reasoners with support for external Java reasoners, offering flexibility for users. OWLAPY facilitates multiple implementations of core ontology components and provides robust conversion capabilities between OWL class expressions and formats such as Description Logics, Manchester Syntax, and SPARQL. It also allows users to define custom workflows to leverage large language models (LLMs) in ontology generation from natural language text. OWLAPY serves as a well-tested software framework for users seeking a flexible Python library for advanced ontology engineering, including those transitioning from Java-based environments. The project is publicly available on GitHub at https://github.com/dice-group/owlapy and on the Python Package Index (PyPI) at https://pypi.org/project/owlapy/ , with over 50,000 downloads at the time of writing.