Hi Stas, hi all,
I just noted that BlazeGraph seems to contain a few erroneous triples. The following query, for example, returns a blank node "t7978245":
SELECT ?superClass WHERE { http://www.wikidata.org/entity/Q595133 p:P279/ps:P279 ?superClass }
https://query.wikidata.org/#SELECT%20%3FsuperClass%20WHERE%20%7B%0A%20%20%3C...
I stumbled upon six cases like this (for P279): Q595133 (shown above), Q1691488, Q11259005, Q297106, Q1293664, and Q539558. This would be less than 0.001% of the 623,963 P279 statements, but it's still enough to have application code trip over the unexpected return format ;-).
Best
Markus
These are used as placeholders for the meta-values "unknown value" and "no value" aren't they ?
On 26/02/2016 12:27, Markus Kroetzsch wrote:
Hi Stas, hi all,
I just noted that BlazeGraph seems to contain a few erroneous triples. The following query, for example, returns a blank node "t7978245":
SELECT ?superClass WHERE { http://www.wikidata.org/entity/Q595133 p:P279/ps:P279 ?superClass }
https://query.wikidata.org/#SELECT%20%3FsuperClass%20WHERE%20%7B%0A%20%20%3C...
I stumbled upon six cases like this (for P279): Q595133 (shown above), Q1691488, Q11259005, Q297106, Q1293664, and Q539558. This would be less than 0.001% of the 623,963 P279 statements, but it's still enough to have application code trip over the unexpected return format ;-).
Best
Markus
You're not really supposed to use a named blank node as if it had a specific meaning.
rdf:nil represents the empty list and is a good stand-in for "no value" situations.
On Fri, Feb 26, 2016 at 7:32 AM, James Heald j.heald@ucl.ac.uk wrote:
These are used as placeholders for the meta-values "unknown value" and "no value" aren't they ?
On 26/02/2016 12:27, Markus Kroetzsch wrote:
Hi Stas, hi all,
I just noted that BlazeGraph seems to contain a few erroneous triples. The following query, for example, returns a blank node "t7978245":
SELECT ?superClass WHERE { http://www.wikidata.org/entity/Q595133 p:P279/ps:P279 ?superClass }
https://query.wikidata.org/#SELECT%20%3FsuperClass%20WHERE%20%7B%0A%20%20%3C... https://query.wikidata.org/#SELECT%20%3FsuperClass%20WHERE%20%7B%0A%20%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fentity%2FQ595133%3E%20p%3AP279%2Fps%3AP279%20%3FsuperClass%0A%7D
I stumbled upon six cases like this (for P279): Q595133 (shown above), Q1691488, Q11259005, Q297106, Q1293664, and Q539558. This would be less than 0.001% of the 623,963 P279 statements, but it's still enough to have application code trip over the unexpected return format ;-).
Best
Markus
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
On 26.02.2016 14:25, Paul Houle wrote:
You're not really supposed to use a named blank node as if it had a specific meaning.
The name of a bnode never indicates a specific meaning. It is only used to mark multiple occurrences of the same bnode in some syntactic formats (such as RDF serialisations or SPARQL query results). Different syntactic formats of the same RDF document use bnode names in different places (for example, N3 syntax needs more bnode names than Turtle syntax to encode the same RDF graph). The concept of a "named" bnode is a syntactic one that is specific to serialisations. Bnode names are not part of the RDF semantics at all. Moreover, the names can change when you process RDF data, and from request to request.
I wonder if SPARQL actually supports unnamed bnodes in its result formats. In any case, it would often be more expensive for a query engine to check if the same bnode occurs multiple times in a result in order to replace it with an unnamed bnode if it doesn't.
rdf:nil represents the empty list and is a good stand-in for "no value" situations.
Using rdf:nil actually not be correct here, neither in RDF nor in SPARQL results. The simple example is a query for "all pairs of a woman and a man who have a child together". You don't want to get all pairs of people who have no child (that's what "no value" means) or who have an unspecified child (that's what "unknown value" means). In either case, the results would be wrong if you used rdf:nil to represent the (missing or unknown) values.
Cheers,
Markus
On 26.02.2016 13:32, James Heald wrote:
These are used as placeholders for the meta-values "unknown value" and "no value" aren't they ?
Oh, right! I had not considered it to be possible that any subclass of statement would use "unknown value". All classes could at least be subclasses of "Entity" if nothing else can be said about them. For some of the cases in the list I found, it is also unclear why they should be classes at all.
Anyway, this at least clarifies that there is no problem with the RDF export/import here and instead we just have some strange data.
Markus
On 26/02/2016 12:27, Markus Kroetzsch wrote:
Hi Stas, hi all,
I just noted that BlazeGraph seems to contain a few erroneous triples. The following query, for example, returns a blank node "t7978245":
SELECT ?superClass WHERE { http://www.wikidata.org/entity/Q595133 p:P279/ps:P279 ?superClass }
https://query.wikidata.org/#SELECT%20%3FsuperClass%20WHERE%20%7B%0A%20%20%3C...
I stumbled upon six cases like this (for P279): Q595133 (shown above), Q1691488, Q11259005, Q297106, Q1293664, and Q539558. This would be less than 0.001% of the 623,963 P279 statements, but it's still enough to have application code trip over the unexpected return format ;-).
Best
Markus
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Hi!
These are used as placeholders for the meta-values "unknown value" and "no value" aren't they ?
Oh, right! I had not considered it to be possible that any subclass of statement would use "unknown value". All classes could at least be
Yes, bnodes are unknown values. It is kind of weird to have one in P279 since most things with unknown classes just do not have any class, so I would say it is a kind of data error unless there's a really good explanation behind it. But from the RDF/SPARQL point of view it's producing what it supposed to, just in a weird place.
"no value" is different though - it would be "a wdno:P279" in this case. Which would say "this item is not subclass of any class whatsoever" which also sounds kind of strange to me, but maybe there are reasons for that.
subclasses of "Entity" if nothing else can be said about them. For some of the cases in the list I found, it is also unclear why they should be classes at all.
Every item in RDF dump does have "a wikibase:Item" triple. But in SPARQL store we drop it since pretty much everything has it so querying by it is useless and 19M of such triples just sit there and take space.
On 2/26/16 3:42 PM, Stas Malyshev wrote:
Hi!
These are used as placeholders for the meta-values "unknown value" and "no value" aren't they ?
Oh, right! I had not considered it to be possible that any subclass of statement would use "unknown value". All classes could at least be
Yes, bnodes are unknown values.
They are identifiers that provide indefinite pronoun functionality [1], in regards to RDF Language based sentences/statements.
[1] https://en.wikipedia.org/wiki/Indefinite_pronoun -- Indefinite pronouns [2] https://en.wikipedia.org/wiki/Linguistic_typology -- What RDF statements/sentences are about