How to convert owl to json with Owlready2?

classic Classic list List threaded Threaded
4 messages Options
PY
Reply | Threaded
Open this post in threaded view
|

How to convert owl to json with Owlready2?

PY
I'd like to convert owl format to json format. Is there a way to do so with Owlready2? Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: How to convert owl to json with Owlready2?

Jiba
Administrator
Hello,

This can be done using Owlready2 for loading and accessing an OWL ontology and the json Python module for writing a json file.

However, you still have to translate the OWL construct in JSON -- I'm not aware of a standard way for representing ontologies in JSON.

Kind regards,
Jean-Baptiste Lamy
MCF, LIMICS, Université Paris 13

>
>
> I'd like to convert owl format to json format. Is there a way to do so with
> Owlready2? Thanks.
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://owlready.8326.n8.nabble.com/How-to-convert-owl-to-json-with-Owlready2-tp70.html
> To start a new topic under Owlready, email [hidden email]
> To unsubscribe from Owlready, visit
PY
Reply | Threaded
Open this post in threaded view
|

Re: How to convert owl to json with Owlready2?

PY
http://pythonhosted.org/Owlready2/onto.html#accessing-the-content-of-an-ontology

I don't know what methods I need to use to access an ontology. What is the code in Owlready2 equivalent to the following code?

import pronto
ont = pronto.Ontology('/tmp/doid.owl')
print(ont.json)
Reply | Threaded
Open this post in threaded view
|

Re: How to convert owl to json with Owlready2?

Jiba
Administrator
There is no ".json" equivalent in Owlready : Owlready support the RDF/XML and NTriple file format (and OWL/XML read-only).

As far as I know, there is no standard JSON ontology format.