You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Mark Fischer <mr...@gmail.com> on 2012/09/29 17:20:13 UTC
Can I validate the base model?
Is there some way in which I can attach a reasoning engine to a model and
convince it to
not do any inferencing? I don't want any of the added triplets.
I'm well aware that calling validate() on such a model would not give me a
complete set of
reports but I'm convinced it would give me the information I'm interested
in without bloating
my database/triplet store.
Ideally I'd like to be able to control which types are inferencing are
allowed.
The best I've seen to be able to do this is to try using different Ontology
Model Specifications,
but I haven't found a place where any of them are well documented yet.
Is my best bet to start writing some reasoning machinery myself? I'd rather
not re-invent the
wheel.
--
Mark Fischer
Re: Can I validate the base model?
Posted by Dave Reynolds <da...@gmail.com>.
On 29/09/12 17:42, Mark Fischer wrote:
> Perhaps my issue here arises from my not quite understanding how validation
> works.
>
> In my mind, I had this simplified to: "Here are a bunch of triplets... do
> they make sense?"
>
> The reasoning engine then says: "I can't be sure, I'll have to add a bunch
> more (via inference) to
> be sure I'm seeing the entire picture."
>
> After inferencing, the engine now looks at an expanded store of triples and
> decides if they
> make sense.
>
> I wanted to skip the middle step.
It all comes down to what validation you want to do.
The built-in validation attempts to check for logical contradictions
that arise due to errors in the ontology (for an example that two
resources can be deduced to be both sameAs and differentFrom each
other). Those contradictions typically don't exist in the base data but
are the result of inference.
In the provided rule sets then *some* of the required inference is
backward chaining. So for those cases it's not "I'll add a bunch of
stuff and hope it's useful" but "I've been asked this validation
question, is there a way of answering it from the data using my rules".
There are other validation tools which ask different questions and don't
use the inference machinery such as Eyeball:
http://jena.apache.org/documentation/tools/eyeball-getting-started.html
A lot of useful validation can also be done by suitably constructed
SPARQL ASK queries.
Dave
Re: Can I validate the base model?
Posted by Mark Fischer <mr...@gmail.com>.
Perhaps my issue here arises from my not quite understanding how validation
works.
In my mind, I had this simplified to: "Here are a bunch of triplets... do
they make sense?"
The reasoning engine then says: "I can't be sure, I'll have to add a bunch
more (via inference) to
be sure I'm seeing the entire picture."
After inferencing, the engine now looks at an expanded store of triples and
decides if they
make sense.
I wanted to skip the middle step.
I'd prefer to do validation as a set of queries that do not trigger any
inferencing. I'm not at all
familiar enough with the machinery that gets this done to know if this is
even reasonable. I've
been treating the reasoning engines as black boxes thus far. Perhaps it
won't be such a bad
idea to look into their workings a bit more closely.
--
Mark Fischer
On Sat, Sep 29, 2012 at 11:57 AM, Dave Reynolds
<da...@gmail.com>wrote:
> On 29/09/12 16:20, Mark Fischer wrote:
>
>> Is there some way in which I can attach a reasoning engine to a model and
>> convince it to
>> not do any inferencing? I don't want any of the added triplets.
>>
>
> Not sure I follow.
>
> If you attach a reasoner to a model then the model is not changed. When
> you query the InfModel (or equivalently OntModel) then inferences will be
> done to answer that query. This is typically a mix of forward inferences
> (all of which will be created as soon as you ask the first query) and
> backward inferences (which will be elaborated only on demand).
>
> Validation is in effect a set of queries (in fact a set of backward rules
> and query to trigger those rules).
>
> Having done the validation you can discard the InfModel and still keep the
> base model around.
>
>
> I'm well aware that calling validate() on such a model would not give me a
>> complete set of
>> reports but I'm convinced it would give me the information I'm interested
>> in without bloating
>> my database/triplet store.
>>
>> Ideally I'd like to be able to control which types are inferencing are
>> allowed.
>>
>
> To get full control then use the generic rules engine [1] and create your
> own rules. The rules for the supplied configurations (default, micro, mini)
> are all in the distribution so you can take those and edit them down how
> you wish.
>
> Dave
>
> [1] http://jena.apache.org/**documentation/inference/#rules<http://jena.apache.org/documentation/inference/#rules>
>
>
Re: Can I validate the base model?
Posted by Dave Reynolds <da...@gmail.com>.
On 29/09/12 16:20, Mark Fischer wrote:
> Is there some way in which I can attach a reasoning engine to a model and
> convince it to
> not do any inferencing? I don't want any of the added triplets.
Not sure I follow.
If you attach a reasoner to a model then the model is not changed. When
you query the InfModel (or equivalently OntModel) then inferences will
be done to answer that query. This is typically a mix of forward
inferences (all of which will be created as soon as you ask the first
query) and backward inferences (which will be elaborated only on demand).
Validation is in effect a set of queries (in fact a set of backward
rules and query to trigger those rules).
Having done the validation you can discard the InfModel and still keep
the base model around.
> I'm well aware that calling validate() on such a model would not give me a
> complete set of
> reports but I'm convinced it would give me the information I'm interested
> in without bloating
> my database/triplet store.
>
> Ideally I'd like to be able to control which types are inferencing are
> allowed.
To get full control then use the generic rules engine [1] and create
your own rules. The rules for the supplied configurations (default,
micro, mini) are all in the distribution so you can take those and edit
them down how you wish.
Dave
[1] http://jena.apache.org/documentation/inference/#rules