Hi Kingsley,

I know how to use inference rules thanks to the documents and I use it in
other cases. But I don't know why I need inference in this case. I don't
necessarily need to suppress that subClassOf* into a subClassOf with an
inference and it's just a regular SPARQL query without any inferences.
Furthermore, RDFS does not have an assumption of using OWL (transitive
property).

If it is the only way, I will add the inference rule for the convenience,
but just want to leave a note that it's an unexpected behavior.


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

On Mon, May 14, 2018 at 4:40 AM, Kingsley Idehen <kide...@openlinksw.com>
wrote:

> On 5/12/18 5:38 PM, Jason Koh wrote:
>
> Sorry I meant entity1 and entity 2 (not entity0 and entity1). And I found
> a more obvious proof of it.
>
>
> More obviously, if I run a query just with a/subClassOf*, it returns the
> correct result.
> ```
> sparql
> prefix : <http://test.abc#>
> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> select ?o where {
>   ?o a/rdfs:subClassOf* :class2.
> };
> ```
> This returns both entity1 and entity2
>
> If I run
> ```
> sparql
> prefix : <http://test.abc#>
> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> select ?s ?o where {
>   ?s :relation1 ?o.
> };
> ```
> It returns both entity1 and entity2.
>
> If I run
> ```
> sparql
> prefix : <http://test.abc#>
> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> select ?s ?o where {
>   ?o a/rdfs:subClassOf* :class2.
>   ?s :relation1 ?o.
> };
> ```
> It returns entity0 only.
>
>
> It looks like a bug to me.
>
>
> With regards,
> Jason Koh
> cseweb.ucsd.edu/~jbkoh <http://cseweb.ucsd.edu/%7Ejbkoh>
>
>
> You need to create an inference rule to make this work.
>
> You could easily have found out how to do this by searching our docs or
> just searching on google.
>
> 1. Make you inference rule based on a named graph that has a relation that
> designates rdfs:subClassOf as being a owl:Transitive property
>
> 2. Make you query with the inference rule enabled.
>
>
> You can also create your own custom inference rule if you want.
> There are lots of documents about these capabilities that you can lookup
> by doing a little bit of research.
>
> --
> 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

Reply via email to