@netwerk-digitaal-erfgoed/network-of-terms-catalog 6.19.1 → 6.21.0
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.
package/README.md
CHANGED
|
@@ -34,7 +34,9 @@ two types of queries:
|
|
|
34
34
|
|
|
35
35
|
* Create a `your-dataset.jsonld` file in the `catalog/` directory and add a description.
|
|
36
36
|
* Create a `your-dataset.rq` file in the `queries/search` directory and add your SPARQL search query. A SPARQL
|
|
37
|
-
lookup goes into the `queries/lookup` directory.
|
|
37
|
+
lookup query goes into the `queries/lookup` directory.
|
|
38
|
+
* If your SPARQL server supports fulltext search relevance scores, you can return them as `vrank:simpleRank` values to
|
|
39
|
+
have search results ordered by rank instead of the default, alphabetical order.
|
|
38
40
|
* [Run the tests](../../docs/tests.md) to make sure your dataset description conforms to the
|
|
39
41
|
[dataset SHACL](shacl/dataset.jsonld).
|
|
40
42
|
* To try your queries locally, you can
|
|
@@ -5,9 +5,8 @@ CONSTRUCT {
|
|
|
5
5
|
?uri a skos:Concept ;
|
|
6
6
|
skos:prefLabel ?schema_name ;
|
|
7
7
|
skos:altLabel ?schema_alternateName ;
|
|
8
|
-
skos:
|
|
9
|
-
|
|
10
|
-
?addressScopeNote .
|
|
8
|
+
skos:hiddenLabel ?hiddenLabel;
|
|
9
|
+
skos:scopeNote ?schema_description, ?scopeNote .
|
|
11
10
|
}
|
|
12
11
|
WHERE {
|
|
13
12
|
# For example:
|
|
@@ -20,24 +19,7 @@ WHERE {
|
|
|
20
19
|
OPTIONAL { ?uri schema:name ?schema_name }
|
|
21
20
|
OPTIONAL { ?uri schema:alternateName ?schema_alternateName }
|
|
22
21
|
OPTIONAL { ?uri schema:description ?schema_description }
|
|
23
|
-
OPTIONAL {
|
|
24
|
-
|
|
25
|
-
BIND("Type: kloostergebouw" AS ?buildingTypeScopeNote)
|
|
26
|
-
}
|
|
27
|
-
OPTIONAL {
|
|
28
|
-
?uri schema:address ?address .
|
|
29
|
-
OPTIONAL { ?address schema:streetAddress ?streetAddress }
|
|
30
|
-
OPTIONAL { ?address schema:addressLocality ?addressLocality }
|
|
31
|
-
OPTIONAL { ?address schema:addressRegion ?addressRegion }
|
|
32
|
-
BIND(
|
|
33
|
-
COALESCE(
|
|
34
|
-
IF(?streetAddress && ?addressLocality && ?addressRegion, CONCAT("Adres: ", ?streetAddress, ", ", ?addressLocality, ", ", ?addressRegion), ?noAddress),
|
|
35
|
-
IF(?streetAddress && ?addressLocality, CONCAT("Adres: ", ?streetAddress, ", ", ?addressLocality), ?noAddress),
|
|
36
|
-
IF(?streetAddress, CONCAT("Adres: ", ?streetAddress), ?noAddress),
|
|
37
|
-
IF(?addressLocality && ?addressRegion, CONCAT("Plaats: ", ?addressLocality, ", ", ?addressRegion), ?noAddress),
|
|
38
|
-
IF(?addressLocality, CONCAT("Plaats: ", ?addressLocality), ?noAddress)
|
|
39
|
-
) AS ?addressScopeNote
|
|
40
|
-
)
|
|
41
|
-
}
|
|
22
|
+
OPTIONAL { ?uri skos:hiddenLabel ?hiddenLabel }
|
|
23
|
+
OPTIONAL { ?uri skos:scopeNote ?scopeNote}
|
|
42
24
|
}
|
|
43
25
|
LIMIT 1000
|
|
@@ -5,36 +5,18 @@ CONSTRUCT {
|
|
|
5
5
|
?uri a skos:Concept ;
|
|
6
6
|
skos:prefLabel ?schema_name ;
|
|
7
7
|
skos:altLabel ?schema_alternateName ;
|
|
8
|
-
skos:
|
|
9
|
-
|
|
10
|
-
?addressScopeNote .
|
|
8
|
+
skos:hiddenLabel ?hiddenLabel;
|
|
9
|
+
skos:scopeNote ?schema_description, ?scopeNote .
|
|
11
10
|
}
|
|
12
11
|
WHERE {
|
|
13
12
|
?uri a schema:LandmarksOrHistoricalBuildings .
|
|
14
13
|
?uri ?predicate ?label .
|
|
15
|
-
VALUES ?predicate { schema:name schema:alternateName }
|
|
14
|
+
VALUES ?predicate { schema:name schema:alternateName skos:hiddenLabel skos:scopeNote}
|
|
16
15
|
FILTER(CONTAINS(LCASE(?label), LCASE(?query)))
|
|
17
16
|
OPTIONAL { ?uri schema:name ?schema_name }
|
|
17
|
+
OPTIONAL { ?uri skos:hiddenLabel ?hiddenLabel }
|
|
18
|
+
OPTIONAL { ?uri skos:scopeNote ?scopeNote}
|
|
18
19
|
OPTIONAL { ?uri schema:alternateName ?schema_alternateName }
|
|
19
20
|
OPTIONAL { ?uri schema:description ?schema_description }
|
|
20
|
-
OPTIONAL {
|
|
21
|
-
?uri schema:additionalType <http://vocab.getty.edu/aat/300000641> .
|
|
22
|
-
BIND("Type: kloostergebouw" AS ?buildingTypeScopeNote)
|
|
23
|
-
}
|
|
24
|
-
OPTIONAL {
|
|
25
|
-
?uri schema:address ?address .
|
|
26
|
-
OPTIONAL { ?address schema:streetAddress ?streetAddress }
|
|
27
|
-
OPTIONAL { ?address schema:addressLocality ?addressLocality }
|
|
28
|
-
OPTIONAL { ?address schema:addressRegion ?addressRegion }
|
|
29
|
-
BIND(
|
|
30
|
-
COALESCE(
|
|
31
|
-
IF(?streetAddress && ?addressLocality && ?addressRegion, CONCAT("Adres: ", ?streetAddress, ", ", ?addressLocality, ", ", ?addressRegion), ?noAddress),
|
|
32
|
-
IF(?streetAddress && ?addressLocality, CONCAT("Adres: ", ?streetAddress, ", ", ?addressLocality), ?noAddress),
|
|
33
|
-
IF(?streetAddress, CONCAT("Adres: ", ?streetAddress), ?noAddress),
|
|
34
|
-
IF(?addressLocality && ?addressRegion, CONCAT("Plaats: ", ?addressLocality, ", ", ?addressRegion), ?noAddress),
|
|
35
|
-
IF(?addressLocality, CONCAT("Plaats: ", ?addressLocality), ?noAddress)
|
|
36
|
-
) AS ?addressScopeNote
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
21
|
}
|
|
40
22
|
LIMIT 1000
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
|
|
2
2
|
PREFIX bengthes: <http://data.beeldengeluid.nl/schema/thes#>
|
|
3
3
|
PREFIX text: <http://jena.apache.org/text#>
|
|
4
|
+
PREFIX vrank: <http://purl.org/voc/vrank#>
|
|
4
5
|
|
|
5
6
|
CONSTRUCT {
|
|
6
7
|
?uri a skos:Concept ;
|
|
@@ -10,13 +11,14 @@ CONSTRUCT {
|
|
|
10
11
|
skos:scopeNote ?scopeNote ;
|
|
11
12
|
skos:broader ?broader_uri ;
|
|
12
13
|
skos:narrower ?narrower_uri ;
|
|
13
|
-
skos:related ?related_uri
|
|
14
|
+
skos:related ?related_uri ;
|
|
15
|
+
vrank:simpleRank ?score .
|
|
14
16
|
?broader_uri skos:prefLabel ?broader_prefLabel .
|
|
15
17
|
?narrower_uri skos:prefLabel ?narrower_prefLabel .
|
|
16
18
|
?related_uri skos:prefLabel ?related_prefLabel .
|
|
17
19
|
}
|
|
18
20
|
WHERE {
|
|
19
|
-
?uri text:query (skos:prefLabel skos:altLabel skos:hiddenLabel ?query) .
|
|
21
|
+
(?uri ?score) text:query (skos:prefLabel skos:altLabel skos:hiddenLabel ?query) .
|
|
20
22
|
?uri skos:inScheme ?datasetUri ;
|
|
21
23
|
bengthes:status ?status .
|
|
22
24
|
FILTER(?status IN ('approved', 'candidate'))
|
|
@@ -53,4 +55,5 @@ WHERE {
|
|
|
53
55
|
FILTER(LANG(?related_prefLabel) = "nl")
|
|
54
56
|
}
|
|
55
57
|
}
|
|
58
|
+
ORDER BY DESC(?score)
|
|
56
59
|
LIMIT 10
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netwerk-digitaal-erfgoed/network-of-terms-catalog",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.21.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Catalog of Network of Terms datasets",
|
|
6
6
|
"repository": {
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"license": "EUPL-1.2",
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@comunica/core": "^2.6.0",
|
|
32
|
-
"@comunica/types": "^2.6.
|
|
32
|
+
"@comunica/types": "^2.6.7",
|
|
33
33
|
"@types/n3": "^1.4.3",
|
|
34
|
-
"@types/rdf-ext": "^
|
|
34
|
+
"@types/rdf-ext": "^2.0.2",
|
|
35
35
|
"gts": "^3.1.1",
|
|
36
|
-
"jsonld-streaming-parser": "^3.
|
|
36
|
+
"jsonld-streaming-parser": "^3.2.0",
|
|
37
37
|
"rdf-data-factory": "^1.1.1",
|
|
38
|
-
"rdf-ext": "^2.
|
|
38
|
+
"rdf-ext": "^2.2.0",
|
|
39
39
|
"rdf-validate-shacl": "^0.4.5"
|
|
40
40
|
},
|
|
41
41
|
"bugs": {
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"homepage": "https://github.com/netwerk-digitaal-erfgoed/network-of-terms-catalog#readme",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@comunica/bindings-factory": "^2.5.1",
|
|
47
|
-
"@comunica/query-sparql-rdfjs": "^2.
|
|
48
|
-
"@netwerk-digitaal-erfgoed/network-of-terms-query": "2.
|
|
47
|
+
"@comunica/query-sparql-rdfjs": "^2.6.8",
|
|
48
|
+
"@netwerk-digitaal-erfgoed/network-of-terms-query": "2.5.0",
|
|
49
49
|
"globby": "^13.1.3",
|
|
50
|
-
"rdf-parse": "^2.
|
|
50
|
+
"rdf-parse": "^2.3.1",
|
|
51
51
|
"rdf-store-stream": "^1.3.1"
|
|
52
52
|
}
|
|
53
53
|
}
|