Import skos:core

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

Import skos:core

Jeff Staples
I need the following text to appear in the output .owl file after creating a new ontology:

<owl:Ontology rdf:about="http://MasterOntology.rgc.regeneron.com/rgc_onto">
  <owl:imports rdf:resource="http://www.w3.org/2004/02/skos/core"/>
</owl:Ontology>

currently it only outputs:

<owl:Ontology rdf:about="http://MasterOntology.rgc.regeneron.com/rgc_onto"/>


How do I use the OWLready2  library to import this library so it is included in the new .owl file it generates?

Thank you,

Jeff

Reply | Threaded
Open this post in threaded view
|

Re: Import skos:core

Jiba
Administrator
Hi,

You can load skos, and then add it to the imported ontologies:

skos = get_ontology("http://www.w3.org/2004/02/skos/core").load()
your_onto.imported_ontologies.append(skos)

Jiba