You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Benson Margulies <bi...@gmail.com> on 2010/12/29 03:19:16 UTC

Predicate paths versus variables

Working, I had the following, which does a tiny bit of inference
without turning on the inference engine.

 { ?entity ?pred ?s .
           ?pred rdfs:subPropertyOf rex:relationship . }

Then I tried to get clever and make paths out of these, and I get
rejected. Is there some variation on this that works?

 { ?entity (?pred | (?pred/owl:sameAs) | (owl:sameAs/?pred)) ?s .
           ?pred rdfs:subPropertyOf rex:relationship . }

Re: Predicate paths versus variables

Posted by Benson Margulies <bi...@gmail.com>.
I guess I should have explained the model.

When a coreference algorithm decides that A and B and 'the same', I
add a triple like

  A owl:sameAs B

On the other hand, when the relationship detector sees something like

The Circus is parked on Main Street.

I add:

    <The Circus> <IsLocatedAt> <MainStreet>

I have a little clan of things like IsLocatedAt, and the purpose of
the subclass business is to find any of them without listing them all
in the query, because people can add new ones to the overall system
easily.

The goal was to collect up a subgraph consisting of all the things
reached by a sameAs, 'relationship', or two steps consisting of a
coref and a 'relationship', in either order.





On Wed, Dec 29, 2010 at 6:04 AM, Andy Seaborne
<an...@epimorphics.com> wrote:
> Property paths can't have variables in them.
>
> And it's not what you want anyway :-)
>
> owl:sameAs links subject to object so the property URI will be in the
> subject or object position to make it the same as another.
>
> Maybe:
>
>  ?pred rdfs:subPropertyOf rex:relationship .
>  ?pred (owl:sameAs|^owl:sameAs)* ?P
>  ?entity ?P ?s .
>
> These queries may not be cheap.
>
>        Andy
>
> On 29/12/10 02:19, Benson Margulies wrote:
>>
>> Working, I had the following, which does a tiny bit of inference
>> without turning on the inference engine.
>>
>>  { ?entity ?pred ?s .
>>            ?pred rdfs:subPropertyOf rex:relationship . }
>>
>> Then I tried to get clever and make paths out of these, and I get
>> rejected. Is there some variation on this that works?
>>
>>  { ?entity (?pred | (?pred/owl:sameAs) | (owl:sameAs/?pred)) ?s .
>>            ?pred rdfs:subPropertyOf rex:relationship . }
>

Re: Predicate paths versus variables

Posted by Andy Seaborne <an...@epimorphics.com>.
Property paths can't have variables in them.

And it's not what you want anyway :-)

owl:sameAs links subject to object so the property URI will be in the 
subject or object position to make it the same as another.

Maybe:

  ?pred rdfs:subPropertyOf rex:relationship .
  ?pred (owl:sameAs|^owl:sameAs)* ?P
  ?entity ?P ?s .

These queries may not be cheap.

	Andy

On 29/12/10 02:19, Benson Margulies wrote:
> Working, I had the following, which does a tiny bit of inference
> without turning on the inference engine.
>
>   { ?entity ?pred ?s .
>             ?pred rdfs:subPropertyOf rex:relationship . }
>
> Then I tried to get clever and make paths out of these, and I get
> rejected. Is there some variation on this that works?
>
>   { ?entity (?pred | (?pred/owl:sameAs) | (owl:sameAs/?pred)) ?s .
>             ?pred rdfs:subPropertyOf rex:relationship . }