weso / sparkwdsub

Spark processing of wikidata subsets
MIT License
0 stars 3 forks source link

Prefix WD not found in gen wiki shape #7

Closed thewillyhuman closed 2 years ago

thewillyhuman commented 2 years ago

The shape genwiki uses the prefix wd but this prefix has not been defined. The following lines are just an example.

https://github.com/weso/sparkwdsub/blob/e53e9d3e63546e8a873688f5ff3d2c39b70e92ac/examples/genewiki.shex#L1-L3 https://github.com/weso/sparkwdsub/blob/e53e9d3e63546e8a873688f5ff3d2c39b70e92ac/examples/genewiki.shex#L9-L12

labra commented 2 years ago

Short answer

It is a typo, you can just replace wd by wde or add the definition

PREFIX wd: <http://www.wikidata.org/entity/>

Longer answer

The ShEx used by sparkwdsub is describing the Wikidata data model instead of the RDF serialization.

That's why, instead of describing the properties by the usual wdt prefix which resolves to: http://www.wikidata.org/prop/direct/ we use wde which resolves to http://www.wikidata.org/entity/, i.e. the entity that represents the property.

This difference will become more clear when we implement the feature to describe references and qualifiers, which will not require the use of the prefixes: p:, ps:, pq:, etc.