Reasoning with Stardog-groovy

1 view
Skip to first unread message

Daniel Stieglitz

unread,
Jun 19, 2013, 6:27:48 PM6/19/13
to sta...@clarkparsia.com
What's the best way to enable/use Stardog's reasoning capabilities through stardog-groovy? According to the documentation I need to enable a reasoning level, and then I assume I can add axions and queries should return inferred results. Is this correct?

Al Baker

unread,
Jun 19, 2013, 10:03:23 PM6/19/13
to sta...@clarkparsia.com
Hi Dan,

At the moment, the best way is probably to initialize the
ext.groovy.Stardog with the ext.spring.DataSource. You can configure
the DataSource with a ReasoningType.

I'll add the same option directly to the ext.groovy.Stardog constructor.

Al
> correct? --
> -- --
> 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
>
>

Daniel Stieglitz

unread,
Jun 19, 2013, 10:10:24 PM6/19/13
to sta...@clarkparsia.com
Hi Al

Thanks for the reply, what I ended up doing was looking up what you did in the Stardog class and re-writing that logic with a raw connection, reasoning enabled. Works like a charm:

   def doReasoningQuery(queryString) {
        Connection c = ConnectionConfiguration
                .to(db_name)
                .url(stardog_url)
                .credentials(db_user, db_pass)  // credentials to use while connecting
                .reasoning(ReasoningType.QL)    // now lets specify that we want a db w/ QL reasoning
                .connect();

        def q = c.query(queryString)
        TupleQueryResult r = q.executeSelect();
        while (r.hasNext()) {
            println r.next();
        }

        r.close();
    }


On Wed, Jun 19, 2013 at 7:03 PM, Al Baker <alb...@clarkparsia.com> wrote:
Hi Dan,

At the moment, the best way is probably to initialize the ext.groovy.Stardog with the ext.spring.DataSource.  You can configure the DataSource with a ReasoningType.

I'll add the same option directly to the ext.groovy.Stardog constructor.

Al


On 6/19/13 6:27 PM, Daniel Stieglitz wrote:
What's the best way to enable/use Stardog's reasoning capabilities through stardog-groovy? According to the documentation I need to enable a reasoning level, and then I assume I can add axions and queries should return inferred results. Is this correct? --
-- --
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
--
-- --
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
Reply all
Reply to author
Forward
0 new messages