forked from emijrp/wikidata
-
Notifications
You must be signed in to change notification settings - Fork 1
/
quickstatements
86 lines (75 loc) · 2.99 KB
/
quickstatements
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
--------------------------------------------
Busca Q que no tengan descripción en catalán
--------------------------------------------
Wikidata Query Service:
SELECT DISTINCT ?item
WHERE
{
?item wdt:P31 wd:Q2074737 .
?item wdt:P131 wd:Q81802 .
OPTIONAL { ?item schema:description ?itemDescription. FILTER(LANG(?itemDescription) = "ca"). }
FILTER (!BOUND(?itemDescription))
SERVICE wikibase:label { bd:serviceParam wikibase:language "es"}
}
Quickstatements:
Q668962 Dca "municipi de la província d'Almeria (Espanya)"
Q1161455 Dca "municipi de la província d'Almeria (Espanya)"
Q1444119 Dca "municipi de la província d'Almeria (Espanya)"
Q1628481 Dca "municipi de la província d'Almeria (Espanya)"
Q284894 Dca "municipi de la província d'Almeria (Espanya)"
Q322064 Dca "municipi de la província d'Almeria (Espanya)"
Hechos:
* Provincia de Almería
* Provincia de Málaga
--------------------------------------------
Busca Q de escritores que no tengan descripción en español
--------------------------------------------
SELECT DISTINCT ?item
WHERE
{
?item wdt:P31 wd:Q5 . #instance of
#?item wdt:P21 wd:Q6581097 . #gender male
?item wdt:P21 wd:Q6581072 . #gender female
?item wdt:P106 wd:Q36180 . #occupation
?item wdt:P27 wd:Q183 . #country of citizenship
?item schema:description "German writer"@en.
OPTIONAL { ?item schema:description ?itemDescription. FILTER(LANG(?itemDescription) = "es"). }
FILTER (!BOUND(?itemDescription))
SERVICE wikibase:label { bd:serviceParam wikibase:language "es"}
}
Q66207 Des "escritor alemán"
Q23059644 Des "escritora alemana"
--------------------------------------------
Busca Q de escritores que no tengan descripción en español
y la inglesa sea "NATIONALITY writer and..."
--------------------------------------------
SELECT DISTINCT ?item ?itemDescriptionEN
WHERE
{
?item wdt:P31 wd:Q5 . #instance of
#?item wdt:P21 wd:Q6581097 . #gender male
#?item wdt:P21 wd:Q6581072 . #gender female
?item wdt:P106 wd:Q36180 . #occupation
?item wdt:P27 wd:Q183 . #country of citizenship
?item schema:description ?description.
{?item schema:description ?itemDescriptionEN. FILTER(LANG(?itemDescriptionEN) = "en"). }
FILTER STRSTARTS(?itemDescriptionEN, "German writer and").
OPTIONAL { ?item schema:description ?itemDescription. FILTER(LANG(?itemDescription) = "es"). }
FILTER (!BOUND(?itemDescription))
SERVICE wikibase:label { bd:serviceParam wikibase:language "es"}
}
------------------------------------------------------
Q sin labels
------------------------------------------------------
SELECT ?item ?labelEN ?labelES
WHERE
{
?item wdt:P31 wd:Q5 . #instance of
?item wdt:P21 wd:Q6581097 . #gender male
?item wdt:P106 wd:Q36180 . #occupation
{?item rdfs:label ?labelEN. FILTER(LANG(?labelEN) = "en"). }
FILTER STRSTARTS(?labelEN, "William").
OPTIONAL { ?item rdfs:label ?labelES. FILTER(LANG(?labelES) = "es"). }
FILTER (!BOUND(?labelES))
#SERVICE wikibase:label { bd:serviceParam wikibase:language "es"}
}