On 30/12/10 18:39, Benson Margulies wrote:
I'll paste enough to repro at the bottom.

In short ... I start with some triples in an OntModel create with
.createOntologyModel().

.createOntologyModel() includes some inference, including subproperty.

They include:

  <http://www.basistech.com/ontologies/2010/12/rules#locatedAt>
       rdfs:subPropertyOf rex:relationship .

<uri:jug:taliban#1>
       <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
                     rex:Organization ;
       <http://www.basistech.com/ontologies/2010/12/rules#locatedAt>
                     <uri:jug:pakistan#1>  ;
       rex:hasNormalizedText
                     "Taliban" .

I query with (this is part of an N-way union, and the CONSTRUCT list
includes ?s2 ?p ?o)

  {
          # start with the triples that have the specified text
           _:b2 rex:hasNormalizedText "<<<MATCH>>>" .
          # any subject that can be reached from there by a single
relationship step.
           _:b2 ?pred ?s2 .
          # where the relationship is defined by one of ours.
           ?pred rdfs:subPropertyOf* rex:relationship .
           ?s2 ?p ?o .
         }

and the results includes the following invented triple for the base
property. It's more or

<uri:jug:taliban#1>
       <http://www.basistech.com/ontologies/2010/6/rex.owl#relationship>
               <uri:jug:pakistan#1>  .

The inference from

>   <http://www.basistech.com/ontologies/2010/12/rules#locatedAt>
>        rdfs:subPropertyOf rex:relationship .

on

<uri:jug:taliban#1>
      <http://www.basistech.com/ontologies/2010/12/rules#locatedAt>
                    <uri:jug:pakistan#1> ;

concludes

> <uri:jug:taliban#1>
>        <http://www.basistech.com/ontologies/2010/6/rex.owl#relationship>
>                <uri:jug:pakistan#1>  .

so it appears in the answers.

For Jena, the inference engines are rule based. You can think of it as calculating all the possible triples and making them visible in the data. For forward-chaining, that is how it works; for backward chaining it only does work at query time; it's not a correct understanding for some OWL constructs like disjunction.

Using inference and property paths for inference is likely to be confusing. In fact, because it's CONSTRUCT, the duplicate work gets suppressed because a graph is a set of triples.

        Andy

Reply via email to