forked from zbw/sparql-queries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmissing_voc2wd.rq
32 lines (32 loc) · 1.03 KB
/
missing_voc2wd.rq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Missing vocabulary links to WD (w/ GND or GeoNames present)
#
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
PREFIX zbwext: <http://zbw.eu/namespaces/zbw-extensions/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#
select distinct ?voc ?s ?sLabel ?prop ?id ?wd ?wdLabel
where {
values ( ?prop ?pm20Property ?wdProperty ) {
( "gnd" gndo:gndIdentifier wdt:P227 )
( "geo" zbwext:geoIdentifier wdt:P1566 )
}
graph ?g {
?s skos:prefLabel ?sLabelLang .
filter(lang(?sLabelLang) = 'de')
bind(str(?sLabelLang) as ?sLabel)
?s ?pm20Property ?id .
bind(strbefore(strafter(str(?g), 'http://zbw.eu/beta/'), 'ng') as ?voc)
}
optional {
graph <http://zbw.eu/beta/wikidata/ng> {
?wd ?wdProperty ?id .
# ?wd rdfs:label ?wdLabelLang .
# filter(lang(?wdLabelLang) = 'de')
# bind(str(?wdLabelLang) as ?wdLabel)
}
}
filter(!bound(?wd))
}
order by ?voc ?sLabel