forked from zbw/sparql-queries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpersons_unmapped_to_wd.rq
36 lines (35 loc) · 1.18 KB
/
persons_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
34
35
# Persons which are not linked to Wikidata, with search links
#
PREFIX zbwext: <http://zbw.eu/namespaces/zbw-extensions/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
#PREFIX schema: <http://schema.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX gndo: <https://d-nb.info/standards/elementset/gnd#>
#
select ?pm20 ?life ?pm20Label (str(?docCount) as ?count) ?search ('search' as ?searchLabel)
where {
{
?pm20 a zbwext:PersonFolder ;
skos:prefLabel ?pm20Label ;
zbwext:freeDocCount ?docCount ;
dcterms:identifier ?pm20Id .
filter(?docCount > 0)
#
} minus {
# entries linked in Wikidata
service <https://query.wikidata.org/sparql> {
select ?pm20Id
where {
?wd wdt:P4293 ?pm20Id .
}
}
}
optional {
?pm20 gndo:dateOfBirthAndDeath ?life .
}
#
bind(uri(concat('http://zbw.eu/beta/sparql-lab/?endpoint=https://zbw.eu/beta/sparql/wikidata/query&queryRef=https://api.github.com/repos/zbw/sparql-queries/contents/wikidata/search_person_by_pm20_names.rq&pm20=<', str(?pm20), '>')) as ?search)
}
order by desc(?docCount)