Giter Club home page Giter Club logo

py-horned-owl's Introduction

py-horned-owl

An experimental bridge from horned-owl to python using PyO3.

Installation

Published version

To install the published library:

pip install py_horned_owl

From sources

To build locally from sources, you will need Rust, PyO3 and Maturin.

Check out this repository: git clone https://github.com/jannahastings/py-horned-owl/

In the directory py-horned-owl, create and activate a virtual Python environment:

virtualenv py-horned-owl

source bin/activate

Then you can get maturin to build the library and install it into the virtual Python environment with:

maturin develop

Usage

The library supports loading ontologies from .owl (RDF-XML) and .owx (OWL-XML) files via horned-owl's parsing functionality. ROBOT can transform ontologies that are in other OWL flavours into one of these formats using robot convert.

Example of simple usage:

import pyhornedowl

ontoname = "family.owx"

onto = pyhornedowl.open_ontology(ontoname)

print (f"Loaded ontology has {len(onto.get_classes())} classes.")
print (f"Loaded ontology has {len(onto.get_axioms())} axioms.")

for c in onto.get_classes():
    print(onto.get_axioms_for_iri(c))


For more information please visit the documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.