Wikidata talk:Relation between properties in RDF and in Wikidata

From Wikidata
Jump to navigation Jump to search

These correspondences are not 100% correct (?)[edit]

For what I can understand, there is an important difference between the Wikidata properties wdt:P31 / wdt:P279 and the RDF(S) constructs rdf:type / rdfs:subClassOf, respectively. While the first two are just properties, the latters (and their combination) really allow us to add a separate level of abstraction for reasoning in an intensional way. In particular, rdfs:subClassOf allows to express an universally quantified statement like that with Wikidata properties, for what I know, we cannot express. This has a deep impact on the entailment.

Indeed, if you state:

ex:dog1 rdf:type        ex:dog .
ex:dog  rdfs:subClassOf ex:animal .

you can then infer that a ex:dog1 is an animal simply by querying

ASK { ex:dog1 rdf:type ex:animal . }

On the contrary, by stating:

ex:dog1 wdt:P31  ex:dog .
ex:dog  wdt:P279 ex:animal .

you can infer that ex:dog1 is an animal only by factitious ways like

ASK { ex:dog1 wdt:P31/wdt:P279* ex:animal . }

In my opinion, from a semantic point of view, this is a crucial difference that should be highlighted. --Horcrux (talk) 15:38, 23 January 2022 (UTC)[reply]

@Horcrux: Actually I've never used a SPARQL endpoint that included entailment such as you describe - do you have examples where this is routinely done? In principle one could make a copy of WDQS that included entailment logic of this sort (assumed transitivity of P279 for P31) but I believe the ad-hoc nature of Wikidata likely makes that somewhat counterproductive - the resulting graph would be excessive and probably full of meaningless or wrong statements. On the other hand, I do agree some things in this table are clearly wrong - related property (P1659) applies only to properties, and it is used simply to provide some context; I think described at URL (P973) would be the better analogy in Wikidata for the "see also" in rdfs. ArthurPSmith (talk) 18:24, 24 January 2022 (UTC)[reply]
@ArthurPSmith: You're right. That's not the default behaviour of a SPARQL engine, as it should support some entailment regime. --Horcrux (talk) 18:39, 24 January 2022 (UTC)[reply]

@Horcrux: the meaning of the two pairs is the same, but they are used differently for reasons both:

  • technical: in WD everything is rdf:type wikibase:Item , because you have other classes to describe structured values, ranking, etc
  • conceptual: WD has a richer meta model than RDF, and wants to apply it even to these 2 basic WD props: qualifiers (eg "VALOR is a: unique identifier; of: financial securities; country: CH, LU), references, etc.
  • pragmatic: as you can surmise from wiki project Ontology, the WD "Ontology" (which could potentially include any item and be edited by 100k editors) is huge, messy and probably circular.

Our GraphDB does reasoning (configured per repo with rules, not per query with regimes). There'd be no problem to add rules to do entailment over the WD props. But the results may not be very useful --Vladimir Alexiev (talk) 18:28, 11 March 2022 (UTC)[reply]