weso / sparkwdsub

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

ValueSetValues with entities in triple constraints #11

Open labra opened 2 years ago

labra commented 2 years ago

At this moment, a ShEx like the following:

prefix : <http://www.wikidata.org/entity/>

<City> {
 :P31 [ :Q515 ]
}

would be wrong because it would be treated as a local triple constraint and wouldn't match any city.

A solution is to rewrite the ShEx as:

prefix : <http://www.wikidata.org/entity/>

<City> {
 :P31 @<CityCode>
}

<CityCode> [ :Q515 ]

Nevertheless, we should rewrite the ShEx converter to handle right that pattern which is very common.