-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathunmapped_to_wd.rq
34 lines (33 loc) · 1.28 KB
/
unmapped_to_wd.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
33
# List of unmapped descriptors in the sequence of the mix-n-match file
#
PREFIX zbwext: <http://zbw.eu/namespaces/zbw-extensions/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#
select ?nta ?stw ?stwLabel ?lookup ('lookup in WD' as ?lookupLabel)
where {
{
?stw a zbwext:Descriptor ;
skos:broader ?thsys .
?thsys a zbwext:Thsys ;
skos:notation ?nta ;
skos:prefLabel ?prefSysLang .
filter(lang(?prefSysLang) = 'de')
?stw skos:prefLabel ?prefLabelEn
filter(lang(?prefLabelEn) = 'en')
?stw skos:prefLabel ?prefLabelDe
filter(lang(?prefLabelDe) = 'de')
bind(concat(?prefLabelDe, ' | ', ?prefLabelEn) as ?stwLabel)
#
# selection by notation (G already covered by m-n-m #507)
filter(strstarts(?nta, 'W.'))
} minus {
service <https://query.wikidata.org/sparql> {
?wd wdt:P3911 ?stwId .
bind(uri(concat('http://zbw.eu/stw/descriptor/', ?stwId)) as ?stw)
}
}
bind(strafter(str(?stw), 'http://zbw.eu/stw/descriptor/') as ?stwId)
bind(uri(concat('http://zbw.eu/beta/sparql-lab/?endpoint=http://zbw.eu/beta/sparql/wikidata/query&queryRef=https://api.github.com/repos/zbw/sparql-queries/contents/wikidata/search_concept_by_stw_labels.rq&stwId=', ?stwId)) as ?lookup)
}
order by ?nta ?stwLabel