@netwerk-digitaal-erfgoed/network-of-terms-catalog 10.15.4 → 10.15.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,9 +5,9 @@ PREFIX wdt: <http://www.wikidata.org/prop/direct/>
5
5
 
6
6
  CONSTRUCT {
7
7
  ?uri a skos:Concept ;
8
- skos:prefLabel ?rdfs_label ;
8
+ skos:prefLabel ?prefLabel ;
9
9
  skos:altLabel ?altLabel ;
10
- skos:scopeNote ?schema_description .
10
+ skos:scopeNote ?description .
11
11
  }
12
12
  WHERE {
13
13
  # For example:
@@ -17,16 +17,16 @@ WHERE {
17
17
  # Street: <http://www.wikidata.org/entity/Q19573969>
18
18
  VALUES ?uri { ?uris }
19
19
 
20
- ?uri rdfs:label ?rdfs_label .
21
- FILTER(LANG(?rdfs_label) = "nl" || LANG(?rdfs_label) = "en")
20
+ ?uri rdfs:label ?prefLabel .
21
+ FILTER(LANG(?prefLabel) = "nl" || LANG(?prefLabel) = "en")
22
22
 
23
23
  OPTIONAL {
24
24
  ?uri skos:altLabel ?altLabel .
25
25
  FILTER(LANG(?altLabel) = "nl" || LANG(?altLabel) = "en")
26
26
  }
27
27
  OPTIONAL {
28
- ?uri schema:description ?schema_description
29
- FILTER(LANG(?schema_description) = "nl" || LANG(?schema_description) = "en")
28
+ ?uri schema:description ?description .
29
+ FILTER(LANG(?description) = "nl" || LANG(?description) = "en")
30
30
  }
31
31
  }
32
32
  LIMIT 1000
@@ -7,33 +7,31 @@ PREFIX vrank: <http://purl.org/voc/vrank#>
7
7
  PREFIX wikibase: <http://wikiba.se/ontology#>
8
8
 
9
9
  CONSTRUCT {
10
- # Wikidata seems to have a problem with the short syntax for construct queries
11
- # so always use full syntax: "?s ?p ?o ." else you end up with an empty result list!
12
- ?item a skos:Concept .
13
- ?item skos:prefLabel ?rdfs_label .
14
- ?item skos:altLabel ?altLabel .
15
- ?item skos:scopeNote ?schema_description .
16
- ?item vrank:simpleRank ?score .
10
+ ?item a skos:Concept ;
11
+ skos:prefLabel ?prefLabel ;
12
+ skos:altLabel ?altLabel ;
13
+ skos:scopeNote ?description ;
14
+ vrank:simpleRank ?score .
17
15
  }
18
16
  WHERE {
19
17
  SERVICE wikibase:mwapi {
20
- bd:serviceParam wikibase:endpoint "www.wikidata.org" .
21
- bd:serviceParam wikibase:api "EntitySearch" .
22
- bd:serviceParam mwapi:language "nl" .
23
- bd:serviceParam mwapi:search ?query .
24
- bd:serviceParam wikibase:limit ?limit .
18
+ bd:serviceParam wikibase:endpoint "www.wikidata.org" ;
19
+ wikibase:api "EntitySearch" ;
20
+ wikibase:limit ?limit ;
21
+ mwapi:language "nl" ;
22
+ mwapi:search ?query .
25
23
  ?item wikibase:apiOutputItem mwapi:item .
26
24
  ?ordinal wikibase:apiOrdinal true.
27
25
  }
28
- ?item rdfs:label ?rdfs_label .
29
- FILTER(LANG(?rdfs_label) = "nl" || LANG(?rdfs_label) = "en")
26
+ ?item rdfs:label ?prefLabel .
27
+ FILTER(LANG(?prefLabel) = "nl" || LANG(?prefLabel) = "en")
30
28
  OPTIONAL {
31
29
  ?item skos:altLabel ?altLabel .
32
30
  FILTER(LANG(?altLabel) = "nl" || LANG(?altLabel) = "en")
33
31
  }
34
32
  OPTIONAL {
35
- ?item schema:description ?schema_description
36
- FILTER(LANG(?schema_description) = "nl" || LANG(?schema_description) = "en")
33
+ ?item schema:description ?description .
34
+ FILTER(LANG(?description) = "nl" || LANG(?description) = "en")
37
35
  }
38
36
  BIND(-?ordinal AS ?score)
39
37
  }
@@ -5,29 +5,25 @@ PREFIX schema: <http://schema.org/>
5
5
  PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
6
6
  PREFIX vrank: <http://purl.org/voc/vrank#>
7
7
  PREFIX wikibase: <http://wikiba.se/ontology#>
8
- PREFIX wdt: <http://www.wikidata.org/prop/direct/>
9
8
  PREFIX wd: <http://www.wikidata.org/entity/>
9
+ PREFIX wdt: <http://www.wikidata.org/prop/direct/>
10
10
 
11
11
  CONSTRUCT {
12
- # Wikidata seems to have a problem with the short syntax for construct queries
13
- # so always use full syntax: "?s ?p ?o ." else you end up with an empty result list!
14
- ?item a skos:Concept .
15
- ?item skos:prefLabel ?prefLabel .
16
- ?item skos:altLabel ?altLabel .
17
- ?item skos:scopeNote ?description .
18
- ?item vrank:simpleRank ?score .
12
+ ?item a skos:Concept ;
13
+ skos:prefLabel ?prefLabel ;
14
+ skos:altLabel ?altLabel ;
15
+ skos:scopeNote ?description ;
16
+ vrank:simpleRank ?score .
19
17
  }
20
18
  WHERE {
21
19
  {
22
20
  SELECT DISTINCT ?item ?score WHERE {
23
21
  SERVICE wikibase:mwapi {
24
- bd:serviceParam wikibase:endpoint "www.wikidata.org" .
25
- # Instead of using the "EntitySearch" API we use a more generic text search option
26
- # To avoid noise we will filter the resultset on the occurence of the search string
27
- # in either prefLabel or altLabel
28
- bd:serviceParam wikibase:api "Search" .
29
- bd:serviceParam mwapi:language "nl" .
30
- bd:serviceParam mwapi:srsearch ?query .
22
+ bd:serviceParam wikibase:endpoint "www.wikidata.org" ;
23
+ wikibase:api "Search" ;
24
+ wikibase:limit "once" ; # Disabling continuation improves performance.
25
+ mwapi:language "nl" ;
26
+ mwapi:srsearch ?query .
31
27
  ?item wikibase:apiOutputItem mwapi:title .
32
28
  ?ordinal wikibase:apiOrdinal true.
33
29
  }
@@ -46,10 +42,10 @@ WHERE {
46
42
  }
47
43
  OPTIONAL {
48
44
  ?item skos:altLabel ?altLabel .
49
- FILTER(LANG(?altLabel) = "nl"|| LANG(?altLabel) = "en")
45
+ FILTER(LANG(?altLabel) = "nl" || LANG(?altLabel) = "en")
50
46
  }
51
47
  OPTIONAL {
52
- ?item schema:description ?description
48
+ ?item schema:description ?description .
53
49
  FILTER(LANG(?description) = "nl" || LANG(?description) = "en")
54
50
  }
55
51
  }
@@ -4,31 +4,30 @@ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
4
4
  PREFIX schema: <http://schema.org/>
5
5
  PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
6
6
  PREFIX vrank: <http://purl.org/voc/vrank#>
7
- PREFIX wikibase: <http://wikiba.se/ontology#>
8
- PREFIX wdt: <http://www.wikidata.org/prop/direct/>
9
7
  PREFIX wd: <http://www.wikidata.org/entity/>
8
+ PREFIX wdt: <http://www.wikidata.org/prop/direct/>
9
+ PREFIX wikibase: <http://wikiba.se/ontology#>
10
10
 
11
11
  CONSTRUCT {
12
- # Wikidata seems to have a problem with the short syntax for construct queries
13
- # so always use full syntax: "?s ?p ?o ." else you end up with an empty result list!
14
- ?item a skos:Concept .
15
- ?item skos:prefLabel ?prefLabel .
16
- ?item skos:altLabel ?altLabel .
17
- ?item skos:scopeNote ?schema_description .
18
- ?item vrank:simpleRank ?score .
12
+ ?item a skos:Concept ;
13
+ skos:prefLabel ?prefLabel ;
14
+ skos:altLabel ?altLabel ;
15
+ skos:scopeNote ?description ;
16
+ vrank:simpleRank ?score .
19
17
  }
20
18
  WHERE {
21
19
  {
22
20
  SELECT DISTINCT ?item ?score WHERE {
23
21
  SERVICE wikibase:mwapi {
24
- bd:serviceParam wikibase:endpoint "www.wikidata.org" .
22
+ bd:serviceParam wikibase:endpoint "www.wikidata.org" ;
25
23
  # The search seems to be done with a "starts with" function,
26
24
  # where by default the English pref and alt labels are searched.
27
25
  # Setting the required language to something else than "en"
28
26
  # results in an additional search in the pref and alt labels for this language.
29
- bd:serviceParam wikibase:api "EntitySearch" .
30
- bd:serviceParam mwapi:language "nl" .
31
- bd:serviceParam mwapi:search ?query .
27
+ wikibase:api "EntitySearch" ;
28
+ wikibase:limit "once" ; # Disabling continuation improves performance.
29
+ mwapi:language "nl" ;
30
+ mwapi:search ?query .
32
31
  ?item wikibase:apiOutputItem mwapi:item .
33
32
  ?ordinal wikibase:apiOrdinal true.
34
33
  }
@@ -79,7 +78,7 @@ WHERE {
79
78
  FILTER(LANG(?altLabel) = "nl" || LANG(?altLabel) = "en")
80
79
  }
81
80
  OPTIONAL {
82
- ?item schema:description ?schema_description
83
- FILTER(LANG(?schema_description) = "nl" || LANG(?schema_description) = "en")
81
+ ?item schema:description ?description .
82
+ FILTER(LANG(?description) = "nl" || LANG(?description) = "en")
84
83
  }
85
84
  }
@@ -1,16 +1,16 @@
1
1
  PREFIX bd: <http://www.bigdata.com/rdf#>
2
2
  PREFIX mwapi: <https://www.mediawiki.org/ontology#API/>
3
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
3
4
  PREFIX schema: <http://schema.org/>
4
5
  PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
5
6
  PREFIX vrank: <http://purl.org/voc/vrank#>
6
- PREFIX wikibase: <http://wikiba.se/ontology#>
7
- PREFIX wdt: <http://www.wikidata.org/prop/direct/>
8
7
  PREFIX wd: <http://www.wikidata.org/entity/>
9
- PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
8
+ PREFIX wdt: <http://www.wikidata.org/prop/direct/>
9
+ PREFIX wikibase: <http://wikiba.se/ontology#>
10
10
 
11
11
  CONSTRUCT {
12
12
  ?item a skos:Concept ;
13
- skos:prefLabel ?streetName ;
13
+ skos:prefLabel ?prefLabel ;
14
14
  skos:altLabel ?altLabel ;
15
15
  skos:scopeNote ?description ;
16
16
  vrank:simpleRank ?score .
@@ -19,14 +19,11 @@ WHERE {
19
19
  {
20
20
  SELECT DISTINCT ?item ?score WHERE {
21
21
  SERVICE wikibase:mwapi {
22
- bd:serviceParam wikibase:endpoint "www.wikidata.org" .
23
- # Instead of using the "EntitySearch" API we use a more generic text search option
24
- # To avoid noise we will filter the resultset on the occurence of the search string
25
- # in either prefLabel or altLabel
26
- bd:serviceParam wikibase:api "Search" .
27
- bd:serviceParam mwapi:language "nl" .
28
-
29
- bd:serviceParam mwapi:srsearch ?query .
22
+ bd:serviceParam wikibase:endpoint "www.wikidata.org" ;
23
+ wikibase:api "Search" ;
24
+ wikibase:limit "once" ; # Disabling continuation improves performance.
25
+ mwapi:language "nl" ;
26
+ mwapi:srsearch ?query .
30
27
  ?item wikibase:apiOutputItem mwapi:title .
31
28
  ?ordinal wikibase:apiOrdinal true.
32
29
  }
@@ -52,15 +49,15 @@ WHERE {
52
49
  #LIMIT#
53
50
  }
54
51
  OPTIONAL {
55
- ?item rdfs:label ?streetName .
56
- FILTER(LANG(?streetName) = "nl" || LANG(?streetName) = "en")
52
+ ?item rdfs:label ?prefLabel .
53
+ FILTER(LANG(?prefLabel) = "nl" || LANG(?prefLabel) = "en")
57
54
  }
58
55
  OPTIONAL {
59
- ?item skos:altLabel ?altLabel
56
+ ?item skos:altLabel ?altLabel .
60
57
  FILTER(LANG(?altLabel) = "nl" || LANG(?altLabel) = "en")
61
58
  }
62
59
  OPTIONAL {
63
- ?item schema:description ?description
60
+ ?item schema:description ?description .
64
61
  FILTER(LANG(?description) = "nl" || LANG(?description) = "en")
65
62
  }
66
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netwerk-digitaal-erfgoed/network-of-terms-catalog",
3
- "version": "10.15.4",
3
+ "version": "10.15.5",
4
4
  "type": "module",
5
5
  "description": "Catalog of Network of Terms datasets",
6
6
  "repository": {