Trouble loading multiple ontology modules

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

Trouble loading multiple ontology modules

mkumba
First off: thanks!! This is an incredible package.  Just discovered it this weekend, very excited.  

I have read the documentation twice, and have looked through most of the Q&A, but I'm missing something fairly fundamental.  (for context, I'm pretty deep on owl itself, kind of a hack in python, so my newbieness will be more on the python side)

I have a set of ontologies, available on the web and also in a directory.  

The lowest level ontology, which just imports a bunch more ontologies is available here
https://ontologies.semanticarts.com/o/gistCore9.0.0
and Protege can find it and suck in all the imports.

I haven't figured out how to get the owlready import mechanism to work.

So I tried just looping through the directory on my local disk, but the load() seems to overwrite what was there before.  Either way would be ok for my purposes here.

Again, thanks for creating this.
Reply | Threaded
Open this post in threaded view
|

Re: Trouble loading multiple ontology modules

mkumba
I have a work around for this immediate problem (I cut and pasted 19 ttl files into one, loaded it in Protege and exported it as an RDF/XML.  

Longer term I would still like to know how to either get the import mechanism to work, and/ or know how to add more that one ontology file into the same ontology, but I now have a new problem, which I'll start a new topic for.
Reply | Threaded
Open this post in threaded view
|

Re: Trouble loading multiple ontology modules

Jiba
Administrator
In reply to this post by mkumba
Hi,

If you want to load all your ontologies from local copies, just put them in a directory, use the last part of the IRI as filename with .owl (for example http://test.org/onto.owl should be in a file called onto.owl), and add that directory to the global variable onto_path.

Owlready will automatically load imported ontologies.

Jiba