generated from FacultadInformatica-LinkedData/Template-Curso
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathAssignment3_DavidHernando.txt
63 lines (44 loc) · 2.89 KB
/
Assignment3_DavidHernando.txt
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
1.Get all the properties that can be applied to instances of the Politician class.
SELECT DISTINCT ?prop
WHERE
{
?inst a <http://dbpedia.org/ontology/Politician> .
?inst ?prop ?propValue
}
LINK1: https://es.dbpedia.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fprop+%0D%0AWHERE%0D%0A%7B%0D%0A%3Finst+a+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FPolitician%3E+.%0D%0A%3Finst+%3Fprop+%3FpropValue%0D%0A%7D+&should-sponge=&format=text%2Fhtml&timeout=0&debug=on&run=+Run+Query+
2.Get all the properties, except for rdf:type, that are applied to instances of the Politician class.
SELECT DISTINCT ?prop
WHERE
{
?inst a <http://dbpedia.org/ontology/Politician> .
?inst ?prop ?propValue .
FILTER (?prop != rdf:type)
}
LINK2:https://es.dbpedia.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fprop+%0D%0AWHERE%0D%0A%7B%0D%0A%3Finst+a+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FPolitician%3E+.%0D%0A%3Finst+%3Fprop+%3FpropValue+.%0D%0AFILTER+%28%3Fprop+%21%3D+rdf%3Atype%29%0D%0A%7D&should-sponge=&format=text%2Fhtml&timeout=0&debug=on&run=+Run+Query+
3. Which different values exist for the properties, except for rdf:type, of the instances of the Politician class?
SELECT DISTINCT ?propValue
WHERE
{
?inst a <http://dbpedia.org/ontology/Politician> .
?inst ?prop ?propValue .
FILTER (?prop != rdf:type)
}
LINK3:https://es.dbpedia.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3FpropValue+%0D%0AWHERE%0D%0A%7B%0D%0A%3Finst+a+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FPolitician%3E+.%0D%0A%3Finst+%3Fprop+%3FpropValue+.%0D%0AFILTER+%28%3Fprop+%21%3D+rdf%3Atype%29%0D%0A%7D&should-sponge=&format=text%2Fhtml&timeout=0&debug=on&run=+Run+Query+
4.For each of these properties, except for rdf:type, which different values do they take in those instances?
SELECT DISTINCT ?prop ?propValue
WHERE
{
?inst a <http://dbpedia.org/ontology/Politician> .
?inst ?prop ?propValue .
FILTER (?prop != rdf:type)
}
LINK4:https://es.dbpedia.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fprop+%3FpropValue+%0D%0AWHERE%0D%0A%7B%0D%0A%3Finst+a+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FPolitician%3E+.%0D%0A%3Finst+%3Fprop+%3FpropValue+.%0D%0AFILTER+%28%3Fprop+%21%3D+rdf%3Atype%29%0D%0A%7D&should-sponge=&format=text%2Fhtml&timeout=0&debug=on&run=+Run+Query+
5. For each of the properties, except for rdf:type, how many distinct values do they take?
SELECT DISTINCT ?prop, count(distinct ?propValue) as ?NumberValues
WHERE
{
?inst rdf:type <http://dbpedia.org/ontology/Politician> .
?inst ?prop ?propValue .
FILTER (?prop != rdf:type)
}
LINK5:https://es.dbpedia.org/sparql?default-graph-uri=&query=SELECT+DISTINCT+%3Fprop%2C+count%28distinct+%3FpropValue%29+as+%3FNumberValues%0D%0AWHERE%0D%0A%7B%0D%0A%3Finst+rdf%3Atype+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2FPolitician%3E+.%0D%0A%3Finst+%3Fprop+%3FpropValue+.%0D%0AFILTER+%28%3Fprop+%21%3D+rdf%3Atype%29%0D%0A%7D&should-sponge=&format=text%2Fhtml&timeout=0&debug=on&run=+Run+Query+