@lde/pipeline-void 0.3.1 → 0.4.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 +26 -30
- package/dist/stage.d.ts +16 -16
- package/dist/stage.d.ts.map +1 -1
- package/dist/stage.js +16 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,34 +6,34 @@ Extensions to [@lde/pipeline](../pipeline) for VoID (Vocabulary of Interlinked D
|
|
|
6
6
|
|
|
7
7
|
### Global stages (one CONSTRUCT query per dataset):
|
|
8
8
|
|
|
9
|
-
| Factory
|
|
10
|
-
|
|
|
11
|
-
| `
|
|
12
|
-
| `
|
|
13
|
-
| `
|
|
14
|
-
| `
|
|
15
|
-
| `
|
|
16
|
-
| `
|
|
17
|
-
| `
|
|
18
|
-
| `
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `
|
|
9
|
+
| Factory | Query |
|
|
10
|
+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
11
|
+
| `classPartitions()` | [`class-partition.rq`](src/queries/class-partition.rq) — Classes with entity counts |
|
|
12
|
+
| `classPropertySubjects()` | [`class-properties-subjects.rq`](src/queries/class-properties-subjects.rq) — Properties per class (subject counts) |
|
|
13
|
+
| `classPropertyObjects()` | [`class-properties-objects.rq`](src/queries/class-properties-objects.rq) — Properties per class (object counts) |
|
|
14
|
+
| `countDatatypes()` | [`datatypes.rq`](src/queries/datatypes.rq) — Dataset-level datatypes |
|
|
15
|
+
| `countObjectLiterals()` | [`object-literals.rq`](src/queries/object-literals.rq) — Literal object counts |
|
|
16
|
+
| `countObjectUris()` | [`object-uris.rq`](src/queries/object-uris.rq) — URI object counts |
|
|
17
|
+
| `countProperties()` | [`properties.rq`](src/queries/properties.rq) — Distinct properties |
|
|
18
|
+
| `countSubjects()` | [`subjects.rq`](src/queries/subjects.rq) — Distinct subjects |
|
|
19
|
+
| `countTriples()` | [`triples.rq`](src/queries/triples.rq) — Total triple count |
|
|
20
|
+
| `detectLicenses()` | [`licenses.rq`](src/queries/licenses.rq) — License detection |
|
|
21
|
+
| `subjectUriSpaces()` | [`subject-uri-space.rq`](src/queries/subject-uri-space.rq) — Subject URI namespaces |
|
|
22
22
|
|
|
23
23
|
### Per-class stages (iterated with a class selector):
|
|
24
24
|
|
|
25
|
-
| Factory
|
|
26
|
-
|
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
25
|
+
| Factory | Query |
|
|
26
|
+
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
27
|
+
| `perClassDatatypes()` | [`class-property-datatypes.rq`](src/queries/class-property-datatypes.rq) — Per-class datatype partitions |
|
|
28
|
+
| `perClassLanguages()` | [`class-property-languages.rq`](src/queries/class-property-languages.rq) — Per-class language tags |
|
|
29
|
+
| `perClassObjectClasses()` | [`class-property-object-classes.rq`](src/queries/class-property-object-classes.rq) — Per-class object class partitions |
|
|
30
30
|
|
|
31
31
|
### Domain-specific stages:
|
|
32
32
|
|
|
33
|
-
| Factory
|
|
34
|
-
|
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
33
|
+
| Factory | Description |
|
|
34
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
35
|
+
| `detectVocabularies()` | [`entity-properties.rq`](src/queries/entity-properties.rq) — Entity properties with automatic `void:vocabulary` detection |
|
|
36
|
+
| `uriSpaces(uriSpaces)` | [`object-uri-space.rq`](src/queries/object-uri-space.rq) — Object URI namespace linksets, aggregated against a provided URI space map |
|
|
37
37
|
|
|
38
38
|
All factories return `Promise<Stage>`.
|
|
39
39
|
|
|
@@ -46,19 +46,15 @@ All factories return `Promise<Stage>`.
|
|
|
46
46
|
|
|
47
47
|
```typescript
|
|
48
48
|
import {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
countTriples,
|
|
50
|
+
classPartitions,
|
|
51
|
+
detectVocabularies,
|
|
52
52
|
} from '@lde/pipeline-void';
|
|
53
53
|
import { Pipeline, SparqlUpdateWriter, provenancePlugin } from '@lde/pipeline';
|
|
54
54
|
|
|
55
55
|
await new Pipeline({
|
|
56
56
|
datasetSelector: selector,
|
|
57
|
-
stages: [
|
|
58
|
-
createTriplesStage(),
|
|
59
|
-
createClassPartitionStage(),
|
|
60
|
-
createVocabularyStage(),
|
|
61
|
-
],
|
|
57
|
+
stages: [countTriples(), classPartitions(), detectVocabularies()],
|
|
62
58
|
plugins: [provenancePlugin()],
|
|
63
59
|
writers: new SparqlUpdateWriter({
|
|
64
60
|
endpoint: new URL('http://localhost:7200/repositories/lde/statements'),
|
package/dist/stage.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Stage } from '@lde/pipeline';
|
|
2
2
|
import type { Quad } from '@rdfjs/types';
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function
|
|
11
|
-
export declare function
|
|
12
|
-
export declare function
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
16
|
-
export declare function
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function
|
|
3
|
+
export declare function subjectUriSpaces(): Promise<Stage>;
|
|
4
|
+
export declare function classPartitions(): Promise<Stage>;
|
|
5
|
+
export declare function countObjectLiterals(): Promise<Stage>;
|
|
6
|
+
export declare function countObjectUris(): Promise<Stage>;
|
|
7
|
+
export declare function countProperties(): Promise<Stage>;
|
|
8
|
+
export declare function countSubjects(): Promise<Stage>;
|
|
9
|
+
export declare function countTriples(): Promise<Stage>;
|
|
10
|
+
export declare function classPropertySubjects(): Promise<Stage>;
|
|
11
|
+
export declare function classPropertyObjects(): Promise<Stage>;
|
|
12
|
+
export declare function countDatatypes(): Promise<Stage>;
|
|
13
|
+
export declare function detectLicenses(): Promise<Stage>;
|
|
14
|
+
export declare function perClassObjectClasses(): Promise<Stage>;
|
|
15
|
+
export declare function perClassDatatypes(): Promise<Stage>;
|
|
16
|
+
export declare function perClassLanguages(): Promise<Stage>;
|
|
17
|
+
export declare function uriSpaces(uriSpaces: ReadonlyMap<string, readonly Quad[]>): Promise<Stage>;
|
|
18
|
+
export declare function detectVocabularies(): Promise<Stage>;
|
|
19
19
|
//# sourceMappingURL=stage.d.ts.map
|
package/dist/stage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../src/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAMN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAyDzC,wBAAgB,
|
|
1
|
+
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../src/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EAMN,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAyDzC,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,KAAK,CAAC,CAEjD;AAED,wBAAgB,eAAe,IAAI,OAAO,CAAC,KAAK,CAAC,CAEhD;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,KAAK,CAAC,CAEpD;AAED,wBAAgB,eAAe,IAAI,OAAO,CAAC,KAAK,CAAC,CAEhD;AAED,wBAAgB,eAAe,IAAI,OAAO,CAAC,KAAK,CAAC,CAEhD;AAED,wBAAgB,aAAa,IAAI,OAAO,CAAC,KAAK,CAAC,CAE9C;AAED,wBAAgB,YAAY,IAAI,OAAO,CAAC,KAAK,CAAC,CAE7C;AAED,wBAAgB,qBAAqB,IAAI,OAAO,CAAC,KAAK,CAAC,CAEtD;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAAC,KAAK,CAAC,CAErD;AAED,wBAAgB,cAAc,IAAI,OAAO,CAAC,KAAK,CAAC,CAE/C;AAED,wBAAgB,cAAc,IAAI,OAAO,CAAC,KAAK,CAAC,CAE/C;AAID,wBAAgB,qBAAqB,IAAI,OAAO,CAAC,KAAK,CAAC,CAItD;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC,CAIlD;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,KAAK,CAAC,CAIlD;AAID,wBAAgB,SAAS,CACvB,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,IAAI,EAAE,CAAC,GAC9C,OAAO,CAAC,KAAK,CAAC,CAKhB;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAAC,KAAK,CAAC,CAKnD"}
|
package/dist/stage.js
CHANGED
|
@@ -37,62 +37,62 @@ function classSelector() {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
// Global stages
|
|
40
|
-
export function
|
|
40
|
+
export function subjectUriSpaces() {
|
|
41
41
|
return createVoidStage('subject-uri-space.rq');
|
|
42
42
|
}
|
|
43
|
-
export function
|
|
43
|
+
export function classPartitions() {
|
|
44
44
|
return createVoidStage('class-partition.rq');
|
|
45
45
|
}
|
|
46
|
-
export function
|
|
46
|
+
export function countObjectLiterals() {
|
|
47
47
|
return createVoidStage('object-literals.rq');
|
|
48
48
|
}
|
|
49
|
-
export function
|
|
49
|
+
export function countObjectUris() {
|
|
50
50
|
return createVoidStage('object-uris.rq');
|
|
51
51
|
}
|
|
52
|
-
export function
|
|
52
|
+
export function countProperties() {
|
|
53
53
|
return createVoidStage('properties.rq');
|
|
54
54
|
}
|
|
55
|
-
export function
|
|
55
|
+
export function countSubjects() {
|
|
56
56
|
return createVoidStage('subjects.rq');
|
|
57
57
|
}
|
|
58
|
-
export function
|
|
58
|
+
export function countTriples() {
|
|
59
59
|
return createVoidStage('triples.rq');
|
|
60
60
|
}
|
|
61
|
-
export function
|
|
61
|
+
export function classPropertySubjects() {
|
|
62
62
|
return createVoidStage('class-properties-subjects.rq');
|
|
63
63
|
}
|
|
64
|
-
export function
|
|
64
|
+
export function classPropertyObjects() {
|
|
65
65
|
return createVoidStage('class-properties-objects.rq');
|
|
66
66
|
}
|
|
67
|
-
export function
|
|
67
|
+
export function countDatatypes() {
|
|
68
68
|
return createVoidStage('datatypes.rq');
|
|
69
69
|
}
|
|
70
|
-
export function
|
|
70
|
+
export function detectLicenses() {
|
|
71
71
|
return createVoidStage('licenses.rq');
|
|
72
72
|
}
|
|
73
73
|
// Per-class stages
|
|
74
|
-
export function
|
|
74
|
+
export function perClassObjectClasses() {
|
|
75
75
|
return createVoidStage('class-property-object-classes.rq', {
|
|
76
76
|
selection: 'perClass',
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
export function
|
|
79
|
+
export function perClassDatatypes() {
|
|
80
80
|
return createVoidStage('class-property-datatypes.rq', {
|
|
81
81
|
selection: 'perClass',
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
export function
|
|
84
|
+
export function perClassLanguages() {
|
|
85
85
|
return createVoidStage('class-property-languages.rq', {
|
|
86
86
|
selection: 'perClass',
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
// Domain-specific executor stages
|
|
90
|
-
export function
|
|
90
|
+
export function uriSpaces(uriSpaces) {
|
|
91
91
|
return createVoidStage('object-uri-space.rq', {
|
|
92
92
|
executor: (query) => new UriSpaceExecutor(new SparqlConstructExecutor({ query }), uriSpaces),
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
|
-
export function
|
|
95
|
+
export function detectVocabularies() {
|
|
96
96
|
return createVoidStage('entity-properties.rq', {
|
|
97
97
|
executor: (query) => new VocabularyExecutor(new SparqlConstructExecutor({ query })),
|
|
98
98
|
});
|
package/package.json
CHANGED