mdld-parse 0.9.2 โ 0.9.4
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/dist/.nojekyll +0 -0
- package/dist/CNAME +1 -0
- package/dist/README.md +425 -0
- package/dist/docs/API.md +397 -0
- package/dist/docs/Architecture.md +190 -0
- package/dist/docs/Guide.md +816 -0
- package/dist/docs/LLM-MDLD-Inducer.md +550 -0
- package/dist/docs/Parser.md +654 -0
- package/dist/docs/Performance.md +238 -0
- package/dist/docs/Spec-render.md +1439 -0
- package/dist/docs/Subject.md +180 -0
- package/dist/docs/Syntax.md +463 -0
- package/dist/docs/TodoList.md +215 -0
- package/dist/docs/Use-Cases.md +354 -0
- package/dist/docs/guide-m.md +56 -0
- package/dist/docs/index.html +108 -0
- package/dist/docs/index.md +56 -0
- package/dist/docs/one-page.md +322 -0
- package/dist/docs/origin.md +459 -0
- package/dist/docs/polarity.md +586 -0
- package/dist/docs/primary-subject.md +199 -0
- package/dist/docs/statements.md +226 -0
- package/dist/docs/tokenization-performance-report.md +164 -0
- package/dist/examples/Cookbook.md +32 -0
- package/dist/examples/Status-SHACL.md +31 -0
- package/dist/examples/demo/index.md +35 -0
- package/dist/examples/demo/journal.md +119 -0
- package/dist/examples/demo/minimal.md +23 -0
- package/dist/examples/demo/project.md +98 -0
- package/dist/examples/demo/prov.md +107 -0
- package/dist/examples/demo/rdf.md +69 -0
- package/dist/examples/demo/recipe.md +95 -0
- package/dist/examples/demo/research.md +126 -0
- package/dist/examples/demo/shacl.md +161 -0
- package/dist/examples/demo/space-mission.md +129 -0
- package/dist/examples/demo/tasks.md +175 -0
- package/dist/examples/demo/xsd.md +91 -0
- package/dist/examples/dogfood.md +288 -0
- package/dist/examples/few-shot.md +309 -0
- package/dist/examples/graph/rdf-graph.html +473 -0
- package/dist/examples/graph/rdf_force_graph_web_component.html +506 -0
- package/dist/examples/index.md +45 -0
- package/dist/examples/llm-time-workflow.md +173 -0
- package/dist/examples/statements.md +43 -0
- package/dist/examples/workflow.md +150 -0
- package/dist/index.html +3253 -0
- package/dist/index.js +1770 -0
- package/dist/logo.svg +7 -0
- package/dist/spec/Spec-compact.md +363 -0
- package/dist/spec/Spec-ultra.md +221 -0
- package/dist/spec/Spec.md +1068 -0
- package/dist/spec/index.md +46 -0
- package/package.json +7 -8
- package/src/constants.js +0 -31
- package/src/generate.js +0 -245
- package/src/highlight.js +0 -362
- package/src/index.js +0 -13
- package/src/locate.js +0 -23
- package/src/merge.js +0 -157
- package/src/parse.js +0 -711
- package/src/render.js +0 -576
- package/src/shared.js +0 -577
- package/src/tokenizers.js +0 -594
- package/src/utils.js +0 -430
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Specification Hub
|
|
2
|
+
|
|
3
|
+
## ๐ [Formal Specification](./Spec.md)
|
|
4
|
+
Complete MD-LD specification with grammar and formal definitions
|
|
5
|
+
|
|
6
|
+
## ๐ [Compact Spec](./Spec-compact.md)
|
|
7
|
+
Concise specification reference for quick lookup
|
|
8
|
+
|
|
9
|
+
## ๐ [CHANGELOG](../CHANGELOG.md)
|
|
10
|
+
Version history and breaking changes
|
|
11
|
+
|
|
12
|
+
## ๐๏ธ [Architecture](../docs/Architecture.md)
|
|
13
|
+
Design principles, processing pipeline, and performance characteristics
|
|
14
|
+
|
|
15
|
+
## ๐งช [Test Suite](../tests/)
|
|
16
|
+
Comprehensive test coverage (105 tests) with examples and validation
|
|
17
|
+
|
|
18
|
+
## Specification Overview
|
|
19
|
+
|
|
20
|
+
MD-LD is a **markdown-linked data** format that combines:
|
|
21
|
+
|
|
22
|
+
- **๐ Markdown syntax** - Familiar authoring experience
|
|
23
|
+
- **๐ RDF semantics** - Standard linked data model
|
|
24
|
+
- **โก Polarity system** - Built-in diff authoring capabilities
|
|
25
|
+
- **๐ Origin tracking** - Complete provenance for every quad
|
|
26
|
+
- **๐ท๏ธ Context management** - Subject declarations and prefix folding
|
|
27
|
+
|
|
28
|
+
### Key Concepts
|
|
29
|
+
|
|
30
|
+
- **Subject declarations** - `{=IRI}` sets current subject
|
|
31
|
+
- **Predicate forms** - `p`, `?p`, `!p` for different relationship types
|
|
32
|
+
- **Value carriers** - `[text]`, `**bold**`, `code blocks`, etc.
|
|
33
|
+
- **Polarity** - `+` (default) and `-` prefixes for diff authoring
|
|
34
|
+
- **Origin tracking** - Lean mapping from quads to source locations
|
|
35
|
+
|
|
36
|
+
### Grammar Highlights
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
Document ::= Prefix* Subject* Annotation*
|
|
40
|
+
Subject ::= '=IRI' | '=#fragment' | '='
|
|
41
|
+
Annotation ::= Carrier Predicate*
|
|
42
|
+
Predicate ::= 'p' | '?p' | '!p' | '.Class'
|
|
43
|
+
Carrier ::= InlineCarrier | BlockCarrier
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
See [Formal Specification](./Spec.md) for complete grammar and semantics.
|
package/package.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdld-parse",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "A standards-compliant parser for **MD-LD (Markdown-Linked Data)** โ a human-friendly RDF authoring format that extends Markdown with semantic annotations.",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"packageManager": "pnpm@10.
|
|
6
|
+
"packageManager": "pnpm@10.33.4+sha512.1c67b3b359b2d408119ba1ed289f34b8fc3c6873412bec6fd264fbdc82489e510fcbecb9ce9d22dae7f3b76269d8441046014bdca53b9979cd7a561ad631b800",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
".": "./
|
|
9
|
+
".": "./dist/index.js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
|
-
"
|
|
13
|
-
"src"
|
|
12
|
+
"dist"
|
|
14
13
|
],
|
|
15
14
|
"scripts": {
|
|
16
15
|
"test": "node tests/index.js",
|
|
@@ -45,6 +44,7 @@
|
|
|
45
44
|
"@unocss/extractor-pug": "^66.6.8",
|
|
46
45
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
47
46
|
"@vueuse/core": "^14.3.0",
|
|
47
|
+
"codejar": "^4.3.0",
|
|
48
48
|
"markdown-it": "^14.1.1",
|
|
49
49
|
"n3": "^2.0.3",
|
|
50
50
|
"shiki": "^4.0.2",
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"vite": "^8.0.10",
|
|
53
53
|
"vite-plugin-singlefile": "^2.3.3",
|
|
54
54
|
"vscode-textmate": "^9.3.2",
|
|
55
|
-
"vue": "^3.6.0-beta.10"
|
|
56
|
-
"codejar": "^4.3.0"
|
|
55
|
+
"vue": "^3.6.0-beta.10"
|
|
57
56
|
}
|
|
58
|
-
}
|
|
57
|
+
}
|
package/src/constants.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared utilities for MD-LD Parser and Renderer
|
|
3
|
-
* Ensures DRY code and consistent CommonMark processing
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export const DEFAULT_CONTEXT = {
|
|
9
|
-
'@vocab': "http://www.w3.org/2000/01/rdf-schema#",
|
|
10
|
-
rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
|
|
11
|
-
rdfs: 'http://www.w3.org/2000/01/rdf-schema#',
|
|
12
|
-
xsd: 'http://www.w3.org/2001/XMLSchema#',
|
|
13
|
-
sh: "http://www.w3.org/ns/shacl#",
|
|
14
|
-
prov: 'http://www.w3.org/ns/prov#'
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// CommonMark patterns - shared between parser and renderer
|
|
18
|
-
export const URL_REGEX = /^(https?|ftp|mailto|tag|nih|urn|uuid|did|web|ipfs|ipns|data|file|urn:uuid):/;
|
|
19
|
-
export const FENCE_REGEX = /^(`{3,}|~{3,})(.*)/;
|
|
20
|
-
export const PREFIX_REGEX = /^\[([^\]]+)\]\s*<([^>]+)>/;
|
|
21
|
-
export const HEADING_REGEX = /^(#{1,6})\s+(.+?)(?:\s*(\{[^}]+\}))?$/;
|
|
22
|
-
export const UNORDERED_LIST_REGEX = /^(\s*)([-*+]|\d+\.)\s+(.+?)(?:\s*(\{[^}]+\}))?\s*$/;
|
|
23
|
-
export const BLOCKQUOTE_REGEX = /^>\s+(.+?)(?:\s*(\{[^}]+\}))?$/;
|
|
24
|
-
export const STANDALONE_SUBJECT_REGEX = /^\s*\{=(.*?)\}\s*$/;
|
|
25
|
-
|
|
26
|
-
// Pre-compiled carrier patterns for performance
|
|
27
|
-
export const CARRIER_PATTERN_ARRAY = [
|
|
28
|
-
['EMPHASIS', /[*__]+(.+?)[*__]+\s*\{([^}]+)\}/y],
|
|
29
|
-
['CODE_SPAN_SINGLE', /`(.+?)`\s*\{([^}]+)\}/y],
|
|
30
|
-
['CODE_SPAN_DOUBLE', /``(.+?)``\s*\{([^}]+)\}/y]
|
|
31
|
-
];
|
package/src/generate.js
DELETED
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import { shortenIRI, expandIRI, DataFactory } from './utils.js';
|
|
2
|
-
import { DEFAULT_CONTEXT } from './constants.js';
|
|
3
|
-
import {
|
|
4
|
-
isLiteral,
|
|
5
|
-
collectUsedPrefixes,
|
|
6
|
-
sortQuadsByPredicate,
|
|
7
|
-
generatePrefixDeclaration,
|
|
8
|
-
generateLiteralText,
|
|
9
|
-
generateObjectText,
|
|
10
|
-
filterQuadsByType
|
|
11
|
-
} from './shared.js';
|
|
12
|
-
|
|
13
|
-
export function extractLocalName(iri, ctx = {}) {
|
|
14
|
-
if (!iri) return iri;
|
|
15
|
-
|
|
16
|
-
// Check for exact prefix matches first
|
|
17
|
-
for (const [prefix, namespace] of Object.entries(ctx)) {
|
|
18
|
-
if (iri.startsWith(namespace) || iri.startsWith(namespace.slice(0, -1))) {
|
|
19
|
-
return iri.substring(namespace.length);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Fallback to original logic for local names
|
|
24
|
-
const separators = ['#', '/', ':'];
|
|
25
|
-
for (const sep of separators) {
|
|
26
|
-
const lastSep = iri.lastIndexOf(sep);
|
|
27
|
-
if (lastSep !== -1 && lastSep < iri.length - 1) {
|
|
28
|
-
return iri.substring(lastSep + 1);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return iri;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Generate deterministic MDLD from RDF quads
|
|
36
|
-
* Purpose: TTLโMDLD conversion with canonical structure
|
|
37
|
-
* Input: RDF quads + context + optional primarySubject (string IRI)
|
|
38
|
-
* Output: MDLD text
|
|
39
|
-
*/
|
|
40
|
-
export function generate({ quads, context = {}, primarySubject = null }) {
|
|
41
|
-
const fullContext = { ...DEFAULT_CONTEXT, ...context };
|
|
42
|
-
|
|
43
|
-
const normalizedQuads = normalizeAndSortQuads(quads);
|
|
44
|
-
|
|
45
|
-
const subjectGroups = groupQuadsBySubject(normalizedQuads);
|
|
46
|
-
|
|
47
|
-
// Fallback: if no primarySubject provided, use first subject from quads
|
|
48
|
-
let effectivePrimary = primarySubject;
|
|
49
|
-
if (!effectivePrimary && normalizedQuads.length > 0) {
|
|
50
|
-
effectivePrimary = normalizedQuads[0].subject.value;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const { text } = buildDeterministicMDLD(subjectGroups, fullContext, effectivePrimary);
|
|
54
|
-
|
|
55
|
-
return { text, context: fullContext };
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Generate node-centric MDLD showing all quads where a specific IRI appears
|
|
60
|
-
* in any position: subject, object, predicate, type, or datatype.
|
|
61
|
-
* Perfect for exploring individual nodes and their complete relationship graph.
|
|
62
|
-
*/
|
|
63
|
-
export function generateNode({ quads, focusIRI, context = {} }) {
|
|
64
|
-
// Validate: must have quads and a focus IRI
|
|
65
|
-
if (!quads?.length || !focusIRI) {
|
|
66
|
-
return { text: '', context: { ...DEFAULT_CONTEXT, ...context } };
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const fullContext = { ...DEFAULT_CONTEXT, ...context };
|
|
70
|
-
const normalizedQuads = normalizeAndSortQuads(quads);
|
|
71
|
-
const nodeGroups = groupQuadsByNode(normalizedQuads);
|
|
72
|
-
|
|
73
|
-
// SAFETY: If focusIRI not in graph, return empty - NEVER fall back to all data
|
|
74
|
-
// This prevents accidental rendering of entire databases on misspelled IRIs
|
|
75
|
-
if (!nodeGroups.has(focusIRI)) {
|
|
76
|
-
return { text: '', context: fullContext };
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const { text } = buildDeterministicMDLD(nodeGroups, fullContext, focusIRI);
|
|
80
|
-
|
|
81
|
-
return { text, context: fullContext };
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function normalizeAndSortQuads(quads) {
|
|
85
|
-
return quads
|
|
86
|
-
.map(quad => {
|
|
87
|
-
// Use DataFactory.fromTerm to ensure proper RDF/JS compatibility
|
|
88
|
-
const normSubject = DataFactory.fromTerm(quad.subject);
|
|
89
|
-
const normPredicate = DataFactory.fromTerm(quad.predicate);
|
|
90
|
-
const normObject = DataFactory.fromTerm(quad.object);
|
|
91
|
-
|
|
92
|
-
return {
|
|
93
|
-
subject: normSubject,
|
|
94
|
-
predicate: normPredicate,
|
|
95
|
-
object: normObject
|
|
96
|
-
};
|
|
97
|
-
})
|
|
98
|
-
.sort((a, b) => {
|
|
99
|
-
// Deterministic sorting: subject -> predicate -> object
|
|
100
|
-
const sComp = a.subject.value.localeCompare(b.subject.value);
|
|
101
|
-
if (sComp !== 0) return sComp;
|
|
102
|
-
const pComp = a.predicate.value.localeCompare(b.predicate.value);
|
|
103
|
-
if (pComp !== 0) return pComp;
|
|
104
|
-
const oA = isLiteral(a.object) ? a.object.value : a.object.value;
|
|
105
|
-
const oB = isLiteral(b.object) ? b.object.value : b.object.value;
|
|
106
|
-
return oA.localeCompare(oB);
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function groupQuadsBySubject(quads) {
|
|
111
|
-
const groups = new Map();
|
|
112
|
-
for (const quad of quads) {
|
|
113
|
-
if (!groups.has(quad.subject.value)) {
|
|
114
|
-
groups.set(quad.subject.value, []);
|
|
115
|
-
}
|
|
116
|
-
groups.get(quad.subject.value).push(quad);
|
|
117
|
-
}
|
|
118
|
-
return groups;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
function groupQuadsByNode(quads) {
|
|
122
|
-
const groups = new Map();
|
|
123
|
-
const RDFS_TYPE = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type';
|
|
124
|
-
|
|
125
|
-
const ensure = (key) => {
|
|
126
|
-
if (!groups.has(key)) groups.set(key, []);
|
|
127
|
-
return groups.get(key);
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
for (const quad of quads) {
|
|
131
|
-
const { subject, predicate, object } = quad;
|
|
132
|
-
|
|
133
|
-
// 1. Subject (direct properties)
|
|
134
|
-
ensure(subject.value).push(quad);
|
|
135
|
-
|
|
136
|
-
// 2. Object (reverse relations - where this IRI is pointed to)
|
|
137
|
-
if (object.termType === 'NamedNode') {
|
|
138
|
-
ensure(object.value).push(quad);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// 3. Predicate (where this IRI is used as a property)
|
|
142
|
-
ensure(predicate.value).push(quad);
|
|
143
|
-
|
|
144
|
-
// 4. Type (instances - where this IRI is the class/type)
|
|
145
|
-
if (predicate.value === RDFS_TYPE && object.termType === 'NamedNode') {
|
|
146
|
-
ensure(object.value).push(quad);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// 5. Datatype (literals using this as their type)
|
|
150
|
-
if (object.termType === 'Literal' && object.datatype) {
|
|
151
|
-
ensure(object.datatype.value || object.datatype).push(quad);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return groups;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function buildDeterministicMDLD(subjectGroups, context, primarySubject = null) {
|
|
158
|
-
let text = '';
|
|
159
|
-
const usedPrefixes = collectUsedPrefixes(subjectGroups, context);
|
|
160
|
-
|
|
161
|
-
// Build label lookup map for all IRIs that have rdfs:label
|
|
162
|
-
const labelLookup = buildLabelLookup(subjectGroups);
|
|
163
|
-
|
|
164
|
-
// Add prefixes first (deterministic order), but exclude default context prefixes
|
|
165
|
-
const sortedPrefixes = Object.entries(context).sort(([a], [b]) => a.localeCompare(b));
|
|
166
|
-
for (const [prefix, namespace] of sortedPrefixes) {
|
|
167
|
-
// Skip default context prefixes - they're implicit in MDLD
|
|
168
|
-
if (prefix !== '@vocab' && !prefix.startsWith('@') && !DEFAULT_CONTEXT[prefix] && usedPrefixes.has(prefix)) {
|
|
169
|
-
text += generatePrefixDeclaration(prefix, namespace);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
if (sortedPrefixes.length > 0) {
|
|
174
|
-
text += '\n';
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// Process subjects in deterministic order, with primary subject first
|
|
178
|
-
const sortedSubjects = Array.from(subjectGroups.keys()).sort();
|
|
179
|
-
const primarySubjectIRI = primarySubject; // Already a string IRI
|
|
180
|
-
|
|
181
|
-
// If primary subject exists, place it first
|
|
182
|
-
const orderedSubjects = primarySubjectIRI
|
|
183
|
-
? [primarySubjectIRI, ...sortedSubjects.filter(s => s !== primarySubjectIRI)]
|
|
184
|
-
: sortedSubjects;
|
|
185
|
-
|
|
186
|
-
for (const subjectIRI of orderedSubjects) {
|
|
187
|
-
const subjectQuads = subjectGroups.get(subjectIRI);
|
|
188
|
-
// Skip if subject not found in groups (e.g., primarySubject provided but no quads for it)
|
|
189
|
-
if (!subjectQuads) continue;
|
|
190
|
-
|
|
191
|
-
const shortSubject = shortenIRI(subjectIRI, context);
|
|
192
|
-
|
|
193
|
-
// Separate types, literals, and objects using shared utility
|
|
194
|
-
const { types, literals, objects } = filterQuadsByType(subjectQuads);
|
|
195
|
-
|
|
196
|
-
// Check if this subject has a label
|
|
197
|
-
const hasLabel = labelLookup.has(subjectIRI);
|
|
198
|
-
const displayName = hasLabel ? labelLookup.get(subjectIRI) : extractLocalName(subjectIRI, context);
|
|
199
|
-
|
|
200
|
-
// Build annotations: types + label indicator if present
|
|
201
|
-
let annotations = types.length > 0
|
|
202
|
-
? types.map(t => '.' + shortenIRI(t.object.value, context)).sort().join(' ')
|
|
203
|
-
: '';
|
|
204
|
-
if (hasLabel) {
|
|
205
|
-
annotations += (annotations ? ' ' : '') + 'label';
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
const annotationStr = annotations ? ' ' + annotations : '';
|
|
209
|
-
text += `# ${displayName} {=${shortSubject}${annotationStr}}\n\n`;
|
|
210
|
-
|
|
211
|
-
// Add literals (excluding the label used in heading) and objects
|
|
212
|
-
const rdfsLabelIRI = 'http://www.w3.org/2000/01/rdf-schema#label';
|
|
213
|
-
const headingLabel = hasLabel ? labelLookup.get(subjectIRI) : null;
|
|
214
|
-
sortQuadsByPredicate(literals).forEach(quad => {
|
|
215
|
-
// Skip only the label that matches the heading display, render additional labels
|
|
216
|
-
if (quad.predicate.value === rdfsLabelIRI && quad.object.value === headingLabel) {
|
|
217
|
-
return; // Skip the heading label
|
|
218
|
-
}
|
|
219
|
-
text += generateLiteralText(quad, context);
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
sortQuadsByPredicate(objects).forEach(quad => {
|
|
223
|
-
text += generateObjectText(quad, context, labelLookup);
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
text += '\n';
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
return { text };
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
function buildLabelLookup(subjectGroups) {
|
|
233
|
-
const labelLookup = new Map();
|
|
234
|
-
const rdfsLabelIRI = 'http://www.w3.org/2000/01/rdf-schema#label';
|
|
235
|
-
|
|
236
|
-
for (const subjectQuads of subjectGroups.values()) {
|
|
237
|
-
for (const quad of subjectQuads) {
|
|
238
|
-
if (quad.predicate.value === rdfsLabelIRI && quad.object.termType === 'Literal') {
|
|
239
|
-
labelLookup.set(quad.subject.value, quad.object.value);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
return labelLookup;
|
|
245
|
-
}
|