Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I import a multi-part ontology and set the prefix? #68

Open
mathiasp opened this issue Mar 8, 2019 · 2 comments
Open

How do I import a multi-part ontology and set the prefix? #68

mathiasp opened this issue Mar 8, 2019 · 2 comments
Assignees
Labels

Comments

@mathiasp
Copy link

mathiasp commented Mar 8, 2019

I'm trying to import gist https://github.com/semanticarts/gist into tawny-owl, and have it serialized with the gist:-prefix.
This is my first try with tawny...
I started this way: https://gist.github.com/mathiasp/b00c5d9b5052d74aa5acff674393848e and it sort of works, but it doesn't use the prefix on serialization.
Any idea how to go on about this?
And is this a good way to import such an ontology.
I really didn't get importing something without creating a namespaced file for it...
So, any other ontology imported would also need it's own file, or is there a way to do this more elegantly?

And any more proper place for such a quesiton? ;)

Thanks for making tawny-owl available, it looks like something that could help me.

Cheers, Mathias

@phillord phillord self-assigned this Mar 26, 2019
@phillord phillord added the bug label Mar 26, 2019
@phillord
Copy link
Owner

So, the way that you are importing is fine, although there are simpler ways to do this (i.e. not using defread, just using owl-import directly. This is quite a bit easier to do, but makes it harder to refer to things in those ontologies (you have to use their IRIs).

Now, why is the prefix not working? Well, I don't know. The prefix is being consumed by defread and it should be used when serializing it. But it's not. I shall investigate.

@phillord
Copy link
Owner

Actually, I am not so convinced.

:prefix "gist"
  ;; normally only things from this IRI will be imported
:iri "http://ontologies.semanticarts.com/o/gistCategory" 

means give the prefix to this IRI, while this:

(clojure.core/partial tawny.read/iri-starts-with-filter "http://ontologies.semanticarts.com/gist")

means "only add these terms to the namespace". Now, if, for example, you use http://ontologies.semanticarts.com/gist/Person the concept, then it doesn't have a prefix because you haven't given one.

At the moment, tawny doesn't have a mechanism for passing in additional prefixes; no reason not to add this though, it would be simple enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants