Re: [Virtuoso-users] A wrong behavior of SPARQL with transitive relationships.

2018-05-12 Thread Kingsley Idehen
On 5/12/18 5:11 PM, Jason Koh wrote:
> From https://www.w3.org/TR/sparql11-property-paths/,
> /elt*/A path of zero or more occurrences of /elt/.
>
>
>
>
> With regards,
> Jason Koh
> cseweb.ucsd.edu/~jbkoh 


You have:



You have:

```
sparql
prefix : 
prefix rdf: 
prefix rdfs: 
prefix owl: 
insert IN GRAPH 
{
  :class1 a owl:Class .
  :class2 a owl:Class .
  :entity0 a :class1.
  :entity1 a :class2.
  :entity2 a :class2.
  :entity0 :relation1 :entity1.
  :entity0 :relation1 :entity2.
};
```

Where are your rdfs:subClassOf relations?

Implies it should have been:

```
sparql
prefix : 
prefix rdf: 
prefix rdfs: 
prefix owl: 
insert IN GRAPH 
{
  :class1 a owl:Class .
  :class2 a owl:Class .
## Note relation added here ##
  :class2 rdfs:subClassOf :class1 .
  :entity0 a :class1.
  :entity1 a :class2.
  :entity2 a :class2.
  :entity0 :relation1 :entity1.
  :entity0 :relation1 :entity2.
};
```

Kingsley

>
> On Sat, May 12, 2018 at 2:10 PM, Jason Koh  > wrote:
>
> Hi Kingsley,
>
> I put * path modifier, which should also match no subClassOf
> relationship pattern in my understanding.
>
>
> With regards,
> Jason Koh
> cseweb.ucsd.edu/~jbkoh 
>
> On Sat, May 12, 2018 at 1:57 PM, Kingsley Idehen
> > wrote:
>
> On 5/11/18 4:56 PM, Jason Koh wrote:
>> Hi,
>>
>> I am using Virtuoso opensource v7.2.4. I found that SPARQLs
>> with transitive relationships return partial results. Could
>> you confirm this behavior? Here are the reproducing ISQL queries.
>>
>> - Data insertion:
>>
>> ```
>> sparql
>> prefix : 
>> prefix rdf: > >
>> prefix rdfs: > >
>> prefix owl: > >
>> insert IN GRAPH 
>> {
>>   :class1 a owl:Class .
>>   :class2 a owl:Class .
>>   :entity0 a :class1.
>>   :entity1 a :class2.
>>   :entity2 a :class2.
>>   :entity0 :relation1 :entity1.
>>   :entity0 :relation1 :entity2.
>> };
>> ```
>>
>> - Verification of the data
>>
>> ```
>> sparql
>> select ?s ?p ?o from  where {?s ?p ?o .};
>> ```
>>
>> - The problem query
>> ```
>> sparql
>> prefix : 
>> prefix rdfs: > >
>> select ?s ?o where {
>>   #?o a/rdfs:subClassOf* :class2. # Only returns a tuple. I
>> think incorrect.
>>   ?o a :class2. # returns all the tuples. I think correct.
>>   ?s :relation1 ?o.
>> };
>> ```
>>
>> If I run the above query, it only returns one pair of ?s and
>> ?o instead of two pairs of (entity0, entity1) and (entity0,
>> entity1). If I comment out the transitive line and uncomment
>> the second line, it returns the correct result with the two
>> pairs. I believe those two queries should return the same result.
>>
>> Is this a bug or do I misunderstand something in the SPARQL?
>>
>> Thank you!
>>
>>
>>
>> With regards,
>> Jason Koh
>> cseweb.ucsd.edu/~jbkoh 
>>
>
> You have:
>
> ```
> sparql
> prefix : 
> prefix rdf:  >
> prefix rdfs:  >
> prefix owl:  >
> insert IN GRAPH 
> {
>   :class1 a owl:Class .
>   :class2 a owl:Class .
>   :entity0 a :class1.
>   :entity1 a :class2.
>   :entity2 a :class2.
>   :entity0 :relation1 :entity1.
>   :entity0 :relation1 :entity2.
> };
> ```
>
> Where have are your rdfs:subClassOf relations?
>
>
> [1] http://docs.openlinksw.com/virtuoso/rdfsparqlruleexamples/
>  
> -- built-in inference docs .
>
>
> -- 
> 

Re: [Virtuoso-users] A wrong behavior of SPARQL with transitive relationships.

2018-05-12 Thread Jason Koh
>From https://www.w3.org/TR/sparql11-property-paths/,
*elt** A path of zero or more occurrences of *elt*.


With regards,
Jason Koh
cseweb.ucsd.edu/~jbkoh

On Sat, May 12, 2018 at 2:10 PM, Jason Koh  wrote:

> Hi Kingsley,
>
> I put * path modifier, which should also match no subClassOf relationship
> pattern in my understanding.
>
>
> With regards,
> Jason Koh
> cseweb.ucsd.edu/~jbkoh
>
> On Sat, May 12, 2018 at 1:57 PM, Kingsley Idehen 
> wrote:
>
>> On 5/11/18 4:56 PM, Jason Koh wrote:
>>
>> Hi,
>>
>> I am using Virtuoso opensource v7.2.4. I found that SPARQLs with
>> transitive relationships return partial results. Could you confirm this
>> behavior? Here are the reproducing ISQL queries.
>>
>> - Data insertion:
>>
>> ```
>> sparql
>> prefix : 
>> prefix rdf: 
>> prefix rdfs: 
>> prefix owl: 
>> insert IN GRAPH 
>> {
>>   :class1 a owl:Class .
>>   :class2 a owl:Class .
>>   :entity0 a :class1.
>>   :entity1 a :class2.
>>   :entity2 a :class2.
>>   :entity0 :relation1 :entity1.
>>   :entity0 :relation1 :entity2.
>> };
>> ```
>>
>> - Verification of the data
>>
>> ```
>> sparql
>> select ?s ?p ?o from  where {?s ?p ?o .};
>> ```
>>
>> - The problem query
>> ```
>> sparql
>> prefix : 
>> prefix rdfs: 
>> select ?s ?o where {
>>   #?o a/rdfs:subClassOf* :class2. # Only returns a tuple. I think
>> incorrect.
>>   ?o a :class2. # returns all the tuples. I think correct.
>>   ?s :relation1 ?o.
>> };
>> ```
>>
>> If I run the above query, it only returns one pair of ?s and ?o instead
>> of two pairs of (entity0, entity1) and (entity0, entity1). If I comment out
>> the transitive line and uncomment the second line, it returns the correct
>> result with the two pairs. I believe those two queries should return the
>> same result.
>>
>> Is this a bug or do I misunderstand something in the SPARQL?
>>
>> Thank you!
>>
>>
>>
>> With regards,
>> Jason Koh
>> cseweb.ucsd.edu/~jbkoh 
>>
>>
>> You have:
>>
>> ```
>> sparql
>> prefix : 
>> prefix rdf: 
>> prefix rdfs: 
>> prefix owl: 
>> insert IN GRAPH 
>> {
>>   :class1 a owl:Class .
>>   :class2 a owl:Class .
>>   :entity0 a :class1.
>>   :entity1 a :class2.
>>   :entity2 a :class2.
>>   :entity0 :relation1 :entity1.
>>   :entity0 :relation1 :entity2.
>> };
>> ```
>>
>> Where have are your rdfs:subClassOf relations?
>>
>>
>> [1] http://docs.openlinksw.com/virtuoso/rdfsparqlruleexamples/  --
>> built-in inference docs .
>>
>>
>> --
>> Regards,
>>
>> Kingsley Idehen  
>> Founder & CEO
>> OpenLink Software   (Home Page: http://www.openlinksw.com)
>>
>> Weblogs (Blogs):
>> Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
>> Blogspot Blog: http://kidehen.blogspot.com
>> Medium Blog: https://medium.com/@kidehen
>>
>> Profile Pages:
>> Pinterest: https://www.pinterest.com/kidehen/
>> Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
>> Twitter: https://twitter.com/kidehen
>> Google+: https://plus.google.com/+KingsleyIdehen/about
>> LinkedIn: http://www.linkedin.com/in/kidehen
>>
>> Web Identities (WebID):
>> Personal: http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i
>> : 
>> http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Virtuoso-users mailing list
>> Virtuoso-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>>
>>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users


Re: [Virtuoso-users] A wrong behavior of SPARQL with transitive relationships.

2018-05-12 Thread Jason Koh
Hi Kingsley,

I put * path modifier, which should also match no subClassOf relationship
pattern in my understanding.


With regards,
Jason Koh
cseweb.ucsd.edu/~jbkoh

On Sat, May 12, 2018 at 1:57 PM, Kingsley Idehen 
wrote:

> On 5/11/18 4:56 PM, Jason Koh wrote:
>
> Hi,
>
> I am using Virtuoso opensource v7.2.4. I found that SPARQLs with
> transitive relationships return partial results. Could you confirm this
> behavior? Here are the reproducing ISQL queries.
>
> - Data insertion:
>
> ```
> sparql
> prefix : 
> prefix rdf: 
> prefix rdfs: 
> prefix owl: 
> insert IN GRAPH 
> {
>   :class1 a owl:Class .
>   :class2 a owl:Class .
>   :entity0 a :class1.
>   :entity1 a :class2.
>   :entity2 a :class2.
>   :entity0 :relation1 :entity1.
>   :entity0 :relation1 :entity2.
> };
> ```
>
> - Verification of the data
>
> ```
> sparql
> select ?s ?p ?o from  where {?s ?p ?o .};
> ```
>
> - The problem query
> ```
> sparql
> prefix : 
> prefix rdfs: 
> select ?s ?o where {
>   #?o a/rdfs:subClassOf* :class2. # Only returns a tuple. I think
> incorrect.
>   ?o a :class2. # returns all the tuples. I think correct.
>   ?s :relation1 ?o.
> };
> ```
>
> If I run the above query, it only returns one pair of ?s and ?o instead of
> two pairs of (entity0, entity1) and (entity0, entity1). If I comment out
> the transitive line and uncomment the second line, it returns the correct
> result with the two pairs. I believe those two queries should return the
> same result.
>
> Is this a bug or do I misunderstand something in the SPARQL?
>
> Thank you!
>
>
>
> With regards,
> Jason Koh
> cseweb.ucsd.edu/~jbkoh 
>
>
> You have:
>
> ```
> sparql
> prefix : 
> prefix rdf: 
> prefix rdfs: 
> prefix owl: 
> insert IN GRAPH 
> {
>   :class1 a owl:Class .
>   :class2 a owl:Class .
>   :entity0 a :class1.
>   :entity1 a :class2.
>   :entity2 a :class2.
>   :entity0 :relation1 :entity1.
>   :entity0 :relation1 :entity2.
> };
> ```
>
> Where have are your rdfs:subClassOf relations?
>
>
> [1] http://docs.openlinksw.com/virtuoso/rdfsparqlruleexamples/  --
> built-in inference docs .
>
>
> --
> Regards,
>
> Kingsley Idehen   
> Founder & CEO
> OpenLink Software   (Home Page: http://www.openlinksw.com)
>
> Weblogs (Blogs):
> Legacy Blog: http://www.openlinksw.com/blog/~kidehen/
> Blogspot Blog: http://kidehen.blogspot.com
> Medium Blog: https://medium.com/@kidehen
>
> Profile Pages:
> Pinterest: https://www.pinterest.com/kidehen/
> Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
> Twitter: https://twitter.com/kidehen
> Google+: https://plus.google.com/+KingsleyIdehen/about
> LinkedIn: http://www.linkedin.com/in/kidehen
>
> Web Identities (WebID):
> Personal: http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i
> : 
> http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Virtuoso-users mailing list
> Virtuoso-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users