Select Under Counts in Presance of Reasoning

Hi,

As many of you know, I have a data set which is the genealogies of particular people form early Ireland. I was doing some searching for the ancestors of a particular person so I ran the query below against my data with Stardog 7.1.0 and I was specifically looking at this file with Reasoning turned on (and sameAs Full, punning on):

prefix rel: <http://purl.org/vocab/relationship/>
prefix foaf:  <http://xmlns.com/foaf/0.1/>

select ?a
from <tag:stardog:api:context:all> 
where {
    ?a rel:ancestorOf <http://example.com/LU/de_genelogia_con_culaind.trig#CúCulaind>
}

This query returned 25 results:

a
http://example.com/LU/de_genelogia_con_culaind.trig#Soaldaim-4d4d44a4
http://example.com/LU/de_genelogia_con_culaind.trig#Dubtaigi
http://example.com/LU/de_genelogia_con_culaind.trig#Cubair-76516a19
http://example.com/LU/de_genelogia_con_culaind.trig#Lir-46304844
http://example.com/LU/de_genelogia_con_culaind.trig#Cusantin
http://example.com/LU/de_genelogia_con_culaind.trig#Adachair
http://example.com/LU/de_genelogia_con_culaind.trig#Báetain
http://example.com/LU/de_genelogia_con_culaind.trig#Midgni
http://example.com/LU/de_genelogia_con_culaind.trig#Úachaill
http://example.com/LU/de_genelogia_con_culaind.trig#CaisClothaig
http://example.com/LU/de_genelogia_con_culaind.trig#Cermata-1bbbbd55
http://example.com/LU/de_genelogia_con_culaind.trig#inDagdai-dd481355
http://example.com/LU/de_genelogia_con_culaind.trig#Inde
http://example.com/LU/de_genelogia_con_culaind.trig#Dorain
http://example.com/LU/de_genelogia_con_culaind.trig#Nomail
http://example.com/LU/de_genelogia_con_culaind.trig#Condlai
http://example.com/LU/de_genelogia_con_culaind.trig#Memnón
http://example.com/LU/de_genelogia_con_culaind.trig#Samrith
http://example.com/LL/dáil_araide.trig#puithe
http://example.com/LU/de_genelogia_con_culaind.trig#Buithe
http://example.com/LU/de_genelogia_con_culaind.trig#Tigerndmais
http://example.com/LU/de_genelogia_con_culaind.trig#Follaig
http://example.com/LU/de_genelogia_con_culaind.trig#Ethrióil
http://example.com/Laud_Misc_610/CGH/senchus_síl_hérimóin_annso_fo_héirind.trig#IarélFaíth
http://example.com/Laud_Misc_610/CGH/senchus_síl_hérimóin_annso_fo_héirind.trig#Hérimón

If you look in the file, you will notice that #Lir-46304844 is the same as #Lir and as such the results should contain #Nelruaid. This is one specific example but there are plenty more missing. As an aside, I also ran the following query:

prefix rel: <http://purl.org/vocab/relationship/>

select ?o
from <tag:stardog:api:context:all> 
where {
    <http://example.com/LU/de_genelogia_con_culaind.trig#Lir> rel:childOf ?o
}

This returns the expected outcome 2: http://example.com/LU/de_genelogia_con_culaind.trig#Nelruaid and http://example.com/LU/de_genelogia_con_culaind.trig#Cusantin.

This could be because I do not understand RDF Datasets well enough to know how that effects reasoning but even without that, there are missing individuals who should be in the result set.

I am happy, as always, to share a dump of the database if needed.

Thank you for your time.

So, I had a chance to try this against an alternative to Stardog and it reports back 332 results, which is much closer to what I was expecting and it includes the URLs which I was expecting from Stardog. This means that I believe there is a very real bug in the way in which Stardog deals with this situation. I hope someone can look at this soon because I would think this is effecting other users as well as myself.

I haven't had a chance to look at this yet. I need to find some time to sit down, download your dataset and understand it a bit but I can point you in the direction that I would start looking first. My first guess would be that it's only returning a single url for each individual. SameAs reasoning will pick a random url out of the several possible urls for an individual and use that as the canonical url for that thing. So if you had a dateset with :satchmo and :Louis_armstrong you're result will only contain one or the other depending on which one was picked but not both.

Thanks! Yeah, it can be time consuming to sit down and sort through these things. Yes, I know that owl:sameAs relations are materialized and one is chosen as the "canonical" URL. That is not the problem: the problem is expected URLs like http://example.com/LU/de_genelogia_con_culaind.trig#Elathan and http://example.com/LU/de_genelogia_con_culaind.trig#Nelruaid are not in the result set. These are not in any owl:sameAs triple as these URLs are unique to the particular genealogy so I do not believe it is a misunderstanding of owl:sameAs materialization.

Thanks. That gives me somewhere to start digging. I'll let you know if I find anything but like you mentioned maybe it's just a bug.

Hi Everyone,

I have been away from this project for a bit due to life events but I came back to try the newest Stardog (7.2) to see if this was still a problem but sadly, it is. I am still getting this as a problem. There output of the query from the original post using 7.2 is the same (using sameAs FULL and Punning).

As an aside, I used Ontotext's GraphDB on the same query and I am getting expected results which is why I believe this is a bug with Stardog and not a bug with my query or my understanding.

I would be happy to provide a dump of the database and answer any questions that you may have.