I'm doing something wrong for subclass inference

0 views
Skip to first unread message

npm...@gmail.com

unread,
Feb 22, 2015, 6:53:49 AM2/22/15
to sta...@clarkparsia.com
using the schema.ttl with valid-instance.ttl and invalid-instance.ttl  produce the expected results with protege and kermit.  I'm setting it up wrong in stardog in such a way that it's not inferring subclasses.


Loading with these commands:
stardog-admin db drop testdb
stardog-admin db create -n testdb schema.ttl
stardog data add testdb valid-instance.ttl
stardog-admin  metadata set -o reasoning.schema.graphs=http://www.semanticweb.org/armeninants/ontologies/2015/0/schema testdb
stardog-admin icv add testdb schema.ttl
stardog icv validate testdb -r SL



Attached the ttl files.  Thanks!
invalid-instance.ttl
valid-instance.ttl
schema.ttl

Mike Grove

unread,
Feb 23, 2015, 7:41:38 AM2/23/15
to stardog
On Sun, Feb 22, 2015 at 6:53 AM, <npm...@gmail.com> wrote:
using the schema.ttl with valid-instance.ttl and invalid-instance.ttl  produce the expected results with protege and kermit. 

I assume you mean Hermit?
 
I'm setting it up wrong in stardog in such a way that it's not inferring subclasses.


Loading with these commands:
stardog-admin db drop testdb
stardog-admin db create -n testdb schema.ttl
stardog data add testdb valid-instance.ttl
stardog-admin  metadata set -o reasoning.schema.graphs=http://www.semanticweb.org/armeninants/ontologies/2015/0/schema testdb

You added your schema to the default graph, and then set the database to pull the schema from http://www.semanticweb.org/armeninants/ontologies/2015/0/schema.  So it's not using your axioms when performing reasoning.  You have to add the schema to the graph(s) you've specified for "reasoning.schema.graphs" if you want them to be taken into account.  Otherwise, they're ignored.

Cheers,

Mike
 
stardog-admin icv add testdb schema.ttl
stardog icv validate testdb -r SL



Attached the ttl files.  Thanks!

--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Nate Marks

unread,
Feb 23, 2015, 8:04:47 AM2/23/15
to sta...@clarkparsia.com

Ha! Yeah, hermit.

So whats the correct way to put this data into stardog

Mike Grove

unread,
Feb 23, 2015, 8:09:52 AM2/23/15
to stardog
On Mon, Feb 23, 2015 at 8:04 AM, Nate Marks <npm...@gmail.com> wrote:

Ha! Yeah, hermit.

So whats the correct way to put this data into stardog


Either put it in the graph you specify in `reasoning.schema.graphs` or don't change that setting.

Cheers,

Mike

Nate Marks

unread,
Feb 23, 2015, 8:11:43 AM2/23/15
to sta...@clarkparsia.com

I though that's what I was doing, but are you saying I need to specify the schema.ttl. rather than the namespace?

Mike Grove

unread,
Feb 23, 2015, 8:14:59 AM2/23/15
to stardog
On Mon, Feb 23, 2015 at 8:11 AM, Nate Marks <npm...@gmail.com> wrote:

I though that's what I was doing, but are you saying I need to specify the schema.ttl. rather than the namespace?


`reasoning.schema.graphs` have nothing to do with namespace(s) used in your schema.  The documentation [1][2] might help clarify things for you.

Cheers,

Mike

Nate Marks

unread,
Feb 23, 2015, 8:34:49 AM2/23/15
to sta...@clarkparsia.com
I've read those docs and I accept that I'm an idiot, but I can't figure out which part of that is relevant to my problem.  What command is used to tell stardog to use schema.ttl for reasoning ?

Mike Grove

unread,
Feb 23, 2015, 8:37:59 AM2/23/15
to stardog
On Mon, Feb 23, 2015 at 8:34 AM, Nate Marks <npm...@gmail.com> wrote:
I've read those docs and I accept that I'm an idiot, but I can't figure out which part of that is relevant to my problem.  What command is used to tell stardog to use schema.ttl for reasoning ?

From section 30 [1]:

"You can tell Stardog where the schema is by setting the reasoning.schema.graphs property to one or more named graph URIs."

The default value of which is the default/unnamed graph.  So by adding your schema to the default graph, and using the *default value* for `reasoning.schema.graphs`, Stardog will use it when performing reasoning.

Cheers,

Mike

zachary...@wavestrike.com

unread,
Feb 23, 2015, 10:18:40 AM2/23/15
to sta...@clarkparsia.com, npm...@gmail.com
Comments inline...
 
Loading with these commands:
stardog-admin db drop testdb
stardog-admin db create -n testdb schema.ttl    <== Here you're adding shema.ttl to the default graph
stardog data add testdb valid-instance.ttl
stardog-admin  metadata set -o reasoning.schema.graphs=http://www.semanticweb.org/armeninants/ontologies/2015/0/schema testdb <== Here you're asking it to reason from something other than the default graph
 
I think you should be good to go with the following. Just skip the last line and it will use the default graph for reasoning.
 
Loading with these commands:
stardog-admin db drop testdb
stardog-admin db create -n testdb schema.ttl 
stardog data add testdb valid-instance.ttl
 
Reply all
Reply to author
Forward
0 new messages