mdld-parse 0.9.3 → 0.9.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.
- package/README.md +4 -3
- package/dist/README.md +4 -3
- package/dist/docs/API.md +3 -1
- package/dist/docs/Guide.md +660 -166
- package/dist/docs/LiterateRDF.md +472 -0
- package/dist/docs/Nostr.md +544 -0
- package/dist/docs/Parser.md +57 -1
- package/dist/docs/guide-m.md +56 -0
- package/dist/docs/one-page.md +322 -0
- package/dist/docs/primary-subject.md +64 -13
- package/dist/examples/Status-SHACL.md +8 -10
- package/dist/examples/demo/journal.md +110 -9
- package/dist/examples/demo/minimal.md +18 -6
- package/dist/examples/demo/project.md +90 -7
- package/dist/examples/demo/prov.md +107 -0
- package/dist/examples/demo/rdf.md +69 -0
- package/dist/examples/demo/recipe.md +79 -15
- package/dist/examples/demo/research.md +110 -30
- package/dist/examples/demo/shacl.md +161 -0
- package/dist/examples/demo/space-mission.md +109 -28
- package/dist/examples/demo/tasks.md +175 -0
- package/dist/examples/demo/xsd.md +91 -0
- package/dist/index.html +686 -260
- package/dist/index.js +474 -248
- package/dist/spec/Spec-compact.md +13 -8
- package/dist/spec/Spec-ultra.md +14 -3
- package/dist/spec/Spec.md +68 -20
- package/package.json +2 -2
- package/dist/examples/prov-o.md +0 -2367
- package/dist/examples/rdf.md +0 -827
- package/dist/examples/shacl.md +0 -3399
|
@@ -1,15 +1,98 @@
|
|
|
1
1
|
[proj] <tag:alice@example.com,2026:project/>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Website Redesign {=proj:website .prov:Project label}
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Website redesign project for Q2 2026 with modern responsive design.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Project Metadata {=proj:website-meta .prov:Entity label}
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Budget: [$25,000] {proj:budget ^^xsd:decimal}
|
|
10
|
+
Start date: [2026-06-01] {proj:startDate ^^xsd:date}
|
|
11
|
+
End date: [2026-08-31] {proj:endDate ^^xsd:date}
|
|
12
|
+
Status: [planning] {proj:status}
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
## Team Formation Activity {=proj:team-formation .prov:Activity label}
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Started: [2026-05-15T09:00:00Z] {prov:startedAtTime ^^xsd:dateTime}
|
|
17
|
+
Associated with: [Alice Johnson] {+proj:alice .prov:Person ?prov:wasAssociatedWith} as Project Manager
|
|
18
|
+
Plan: [Q2 Website Plan] {+proj:q2-plan .prov:Plan ?prov:hadPlan}
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
Generated: [Team Structure] {+proj:team-structure ?prov:generated}
|
|
21
|
+
|
|
22
|
+
## Team Members
|
|
23
|
+
|
|
24
|
+
### Project Manager {=proj:alice .prov:Person label}
|
|
25
|
+
|
|
26
|
+
Name: [Alice Johnson] {rdfs:label}
|
|
27
|
+
Email: [alice@example.com] {proj:email}
|
|
28
|
+
Role: [Project Manager] {proj:role}
|
|
29
|
+
|
|
30
|
+
### Lead Developer {=proj:bob .prov:Person label}
|
|
31
|
+
|
|
32
|
+
Name: [Bob Smith] {rdfs:label}
|
|
33
|
+
Email: [bob@example.com] {proj:email}
|
|
34
|
+
Role: [Lead Developer] {proj:role}
|
|
35
|
+
|
|
36
|
+
### UX Designer {=proj:carol .prov:Person label}
|
|
37
|
+
|
|
38
|
+
Name: [Carol Davis] {rdfs:label}
|
|
39
|
+
Email: [carol@example.com] {proj:email}
|
|
40
|
+
Role: [UX Designer] {proj:role}
|
|
41
|
+
|
|
42
|
+
## Project Tasks
|
|
43
|
+
|
|
44
|
+
### Design Phase {=proj:design-phase .prov:Activity label}
|
|
45
|
+
|
|
46
|
+
Started: [2026-06-01] {prov:startedAtTime ^^xsd:date}
|
|
47
|
+
Ended: [2026-06-15] {prov:endedAtTime ^^xsd:date}
|
|
48
|
+
|
|
49
|
+
Tasks:
|
|
50
|
+
- [User Research] {+proj:user-research .proj:Task ?prov:used} - interviews and surveys
|
|
51
|
+
- [Wireframes] {+proj:wireframes .proj:Task ?prov:used} - low-fidelity layouts
|
|
52
|
+
- [High-fidelity Mockups] {+proj:mockups .proj:Task ?prov:used} - detailed designs
|
|
53
|
+
|
|
54
|
+
Generated: [Design Documentation] {+proj:design-docs ?prov:generated}
|
|
55
|
+
|
|
56
|
+
### Development Phase {=proj:dev-phase .prov:Activity label}
|
|
57
|
+
|
|
58
|
+
Started: [2026-06-16] {prov:startedAtTime ^^xsd:date}
|
|
59
|
+
Ended: [2026-07-30] {prov:endedAtTime ^^xsd:date}
|
|
60
|
+
|
|
61
|
+
Tasks:
|
|
62
|
+
- [Frontend Development] {+proj:frontend .proj:Task ?prov:used} - React components
|
|
63
|
+
- [Backend API] {+proj:backend .proj:Task ?prov:used} - Node.js services
|
|
64
|
+
- [Database Schema] {+proj:database .proj:Task ?prov:used} - PostgreSQL design
|
|
65
|
+
|
|
66
|
+
Generated: [Working Prototype] {+proj:prototype ?prov:generated}
|
|
67
|
+
|
|
68
|
+
## Project Relationships
|
|
69
|
+
|
|
70
|
+
### Dependencies {=proj:dependencies .rdfs:Resource label}
|
|
71
|
+
|
|
72
|
+
The project depends on:
|
|
73
|
+
- [Design System] {+proj:design-system ?proj:requires}
|
|
74
|
+
- [API Documentation] {+proj:api-docs ?proj:requires}
|
|
75
|
+
|
|
76
|
+
### Stakeholders {=proj:stakeholders .rdfs:Resource label}
|
|
77
|
+
|
|
78
|
+
Key stakeholders:
|
|
79
|
+
- [Marketing Department] {+proj:marketing ?proj:stakeholder .prov:Organization}
|
|
80
|
+
- [Customer Support] {+proj:support ?proj:stakeholder .prov:Organization}
|
|
81
|
+
|
|
82
|
+
## Delegation Pattern
|
|
83
|
+
|
|
84
|
+
### Development Delegation {=proj:dev-delegation .prov:Delegation ?prov:qualifiedDelegation}
|
|
85
|
+
|
|
86
|
+
Alice delegates frontend development to specialized team.
|
|
87
|
+
|
|
88
|
+
Delegate: [Alice] {+proj:alice ?prov:delegate}
|
|
89
|
+
Responsible: [Frontend Team] {+proj:frontend-team .prov:Organization ?prov:responsible}
|
|
90
|
+
Activity: [Frontend Development] {+proj:frontend-dev .prov:Activity ?prov:hadActivity}
|
|
91
|
+
Role: [Development Lead] {+proj:dev-lead .prov:Role ?prov:hadRole}
|
|
92
|
+
|
|
93
|
+
This demonstrates:
|
|
94
|
+
- Complete PROV-O provenance chains
|
|
95
|
+
- Project lifecycle with phases
|
|
96
|
+
- Team formation and delegation
|
|
97
|
+
- Proper temporal properties
|
|
98
|
+
- Cross-ontology integration
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
[prov] <http://www.w3.org/ns/prov#>
|
|
2
|
+
[my] <tag:alice@example.com,2026:>
|
|
3
|
+
|
|
4
|
+
# PROV-O Provenance Demo {=my:prov-demo .prov:Entity label}
|
|
5
|
+
|
|
6
|
+
Demonstrates complete provenance patterns using W3C PROV-O ontology.
|
|
7
|
+
|
|
8
|
+
## Core PROV-O Classes
|
|
9
|
+
|
|
10
|
+
### Entity Example {=my:report .prov:Entity label}
|
|
11
|
+
|
|
12
|
+
A report is an entity that exists and can be described.
|
|
13
|
+
|
|
14
|
+
Generated by: [Analysis Activity] {+my:analysis ?prov:wasGeneratedBy}
|
|
15
|
+
Attributed to: [Alice] {+my:alice .prov:Person ?prov:wasAttributedTo}
|
|
16
|
+
Derived from: [Raw Data] {+my:raw-data ?prov:wasDerivedFrom}
|
|
17
|
+
|
|
18
|
+
### Activity Example {=my:analysis .prov:Activity label}
|
|
19
|
+
|
|
20
|
+
An activity is something that happens over time.
|
|
21
|
+
|
|
22
|
+
Started: [2026-05-06T09:00:00Z] {prov:startedAtTime ^^xsd:dateTime}
|
|
23
|
+
Ended: [2026-05-06T10:30:00Z] {prov:endedAtTime ^^xsd:dateTime}
|
|
24
|
+
Associated with: [Alice] {+my:alice ?prov:wasAssociatedWith}
|
|
25
|
+
Used: [Raw Data] {+my:raw-data ?prov:used}
|
|
26
|
+
Generated: [Report] {+my:report ?prov:generated}
|
|
27
|
+
|
|
28
|
+
### Agent Example {=my:alice .prov:Person label}
|
|
29
|
+
|
|
30
|
+
An agent is something that can bear responsibility.
|
|
31
|
+
|
|
32
|
+
Name: [Alice Smith] {my:name}
|
|
33
|
+
Email: [alice@example.com] {my:email}
|
|
34
|
+
Role: [Data Analyst] {my:role}
|
|
35
|
+
|
|
36
|
+
## Qualified Provenance Patterns
|
|
37
|
+
|
|
38
|
+
### Qualified Usage {=my:qualified-usage .prov:Usage ?prov:qualifiedUsage label}
|
|
39
|
+
|
|
40
|
+
Describes how an entity was used in an activity.
|
|
41
|
+
|
|
42
|
+
Entity: [Raw Data] {+my:raw-data ?prov:entity}
|
|
43
|
+
Activity: [Analysis] {+my:analysis ?prov:activity}
|
|
44
|
+
Role: [Input Dataset] {+my:input-dataset .prov:Role ?prov:hadRole}
|
|
45
|
+
Time: [2026-05-06T09:15:00Z] {prov:atTime ^^xsd:dateTime}
|
|
46
|
+
|
|
47
|
+
### Qualified Generation {=my:qualified-generation .prov:Generation ?prov:qualifiedGeneration label}
|
|
48
|
+
|
|
49
|
+
Describes how an entity was generated by an activity.
|
|
50
|
+
|
|
51
|
+
Entity: [Report] {+my:report ?prov:entity}
|
|
52
|
+
Activity: [Analysis] {+my:analysis ?prov:activity}
|
|
53
|
+
Role: [Final Output] {+my:output .prov:Role ?prov:hadRole}
|
|
54
|
+
Time: [2026-05-06T10:30:00Z] {prov:atTime ^^xsd:dateTime}
|
|
55
|
+
|
|
56
|
+
### Qualified Association {=my:qualified-association .prov:Association ?prov:qualifiedAssociation label}
|
|
57
|
+
|
|
58
|
+
Describes agent's role in an activity.
|
|
59
|
+
|
|
60
|
+
Activity: [Analysis] {+my:analysis ?prov:activity}
|
|
61
|
+
Agent: [Alice] {+my:alice ?prov:agent}
|
|
62
|
+
Role: [Lead Analyst] {+my:lead-analyst .prov:Role ?prov:hadRole}
|
|
63
|
+
Plan: [Q2 Analysis Plan] {+my:q2-plan .prov:Plan ?prov:hadPlan}
|
|
64
|
+
|
|
65
|
+
## Delegation Pattern
|
|
66
|
+
|
|
67
|
+
### Delegation Example {=my:delegation .prov:Delegation ?prov:qualifiedDelegation label}
|
|
68
|
+
|
|
69
|
+
Alice delegates authority to Bob for a specific task.
|
|
70
|
+
|
|
71
|
+
Delegate: [Alice] {+my:alice ?prov:delegate}
|
|
72
|
+
Responsible: [Bob] {+my:bob .prov:Person ?prov:responsible}
|
|
73
|
+
Activity: [Data Review] {+my:review .prov:Activity ?prov:hadActivity}
|
|
74
|
+
Role: [Reviewer] {+my:reviewer .prov:Role ?prov:hadRole}
|
|
75
|
+
|
|
76
|
+
## Complete Provenance Chain
|
|
77
|
+
|
|
78
|
+
### Research Project {=my:research-project .prov:Entity label}
|
|
79
|
+
|
|
80
|
+
**Initial Dataset Collection** {=my:data-collection .prov:Activity label}
|
|
81
|
+
- Started: [2026-04-01] {prov:startedAtTime ^^xsd:date}
|
|
82
|
+
- Agent: [Research Team] {+my:team ?prov:wasAssociatedWith}
|
|
83
|
+
- Generated: [Dataset v1] {+my:dataset-v1 ?prov:generated}
|
|
84
|
+
|
|
85
|
+
**Data Analysis** {=my:data-analysis .prov:Activity label}
|
|
86
|
+
- Used: [Dataset v1] {+my:dataset-v1 ?prov:used}
|
|
87
|
+
- Started: [2026-04-15] {prov:startedAtTime ^^xsd:date}
|
|
88
|
+
- Agent: [Alice] {+my:alice ?prov:wasAssociatedWith}
|
|
89
|
+
- Generated: [Analysis Results] {+my:analysis-results ?prov:generated}
|
|
90
|
+
|
|
91
|
+
**Report Writing** {=my:report-writing .prov:Activity label}
|
|
92
|
+
- Informed by: [Data Analysis] {+my:data-analysis ?prov:wasInformedBy}
|
|
93
|
+
- Started: [2026-05-01] {prov:startedAtTime ^^xsd:date}
|
|
94
|
+
- Agent: [Alice] {+my:alice ?prov:wasAssociatedWith}
|
|
95
|
+
- Generated: [Final Report] {+my:final-report ?prov:generated}
|
|
96
|
+
|
|
97
|
+
**Final Report** {=my:final-report .prov:Entity label}
|
|
98
|
+
- Generated by: [Report Writing] {+my:report-writing ?prov:wasGeneratedBy}
|
|
99
|
+
- Attributed to: [Alice] {+my:alice ?prov:wasAttributedTo}
|
|
100
|
+
- Derived from: [Analysis Results] {+my:analysis-results ?prov:wasDerivedFrom}
|
|
101
|
+
|
|
102
|
+
This demonstrates:
|
|
103
|
+
- Entity-Activity-Entity chains
|
|
104
|
+
- Complete provenance tracking
|
|
105
|
+
- Qualified relationships with roles
|
|
106
|
+
- Delegation patterns
|
|
107
|
+
- Temporal properties
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
[rdf] <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
|
|
2
|
+
[rdfs] <http://www.w3.org/2000/01/rdf-schema#>
|
|
3
|
+
[my] <tag:alice@example.com,2026:>
|
|
4
|
+
|
|
5
|
+
# RDF Fundamentals {=my:rdf-demo .rdfs:Resource label}
|
|
6
|
+
|
|
7
|
+
Demonstrates core RDF concepts using RDF and RDFS vocabularies.
|
|
8
|
+
|
|
9
|
+
## Class Definitions
|
|
10
|
+
|
|
11
|
+
### Document Class {=my:Document .rdfs:Class label}
|
|
12
|
+
|
|
13
|
+
A document is a resource that can have content.
|
|
14
|
+
|
|
15
|
+
Properties:
|
|
16
|
+
- **Title**: [string] {+xsd:string ?rdfs:range}
|
|
17
|
+
- **Content**: [text] {+rdfs:Literal ?rdfs:range}
|
|
18
|
+
- **Format**: [string] {+xsd:string ?rdfs:range}
|
|
19
|
+
|
|
20
|
+
### Person Class {=my:Person .rdfs:Class label}
|
|
21
|
+
|
|
22
|
+
A person is an agent who can create documents.
|
|
23
|
+
|
|
24
|
+
Subclass of: [Agent] {+rdfs:Resource ?rdfs:subClassOf}
|
|
25
|
+
|
|
26
|
+
Properties:
|
|
27
|
+
- **Name**: [string] {+xsd:string ?rdfs:range}
|
|
28
|
+
- **Email**: [string] {+xsd:string ?rdfs:range}
|
|
29
|
+
- **Created**: [Document] {+my:Document ?rdfs:range}
|
|
30
|
+
|
|
31
|
+
### Property Definitions
|
|
32
|
+
|
|
33
|
+
### Title Property {=my:title .rdf:Property label}
|
|
34
|
+
|
|
35
|
+
Relates a document to its title.
|
|
36
|
+
|
|
37
|
+
Domain: [Document] {+my:Document ?rdfs:domain}
|
|
38
|
+
Range: [string] {+xsd:string ?rdfs:range}
|
|
39
|
+
|
|
40
|
+
### Author Property {=my:author .rdf:Property label}
|
|
41
|
+
|
|
42
|
+
Relates a document to its author.
|
|
43
|
+
|
|
44
|
+
Domain: [Document] {+my:Document ?rdfs:domain}
|
|
45
|
+
Range: [Person] {+my:Person ?rdfs:range}
|
|
46
|
+
|
|
47
|
+
## Instance Data
|
|
48
|
+
|
|
49
|
+
### Sample Document {=my:sample-doc .my:Document label}
|
|
50
|
+
|
|
51
|
+
Title: [RDF Basics] {my:title}
|
|
52
|
+
Content: [This document explains RDF fundamentals.] {my:content}
|
|
53
|
+
Format: [Markdown] {my:format}
|
|
54
|
+
|
|
55
|
+
### Sample Person {=my:alice .my:Person label}
|
|
56
|
+
|
|
57
|
+
Name: [Alice Smith] {my:name}
|
|
58
|
+
Email: [alice@example.com] {my:email}
|
|
59
|
+
|
|
60
|
+
### Connecting Them
|
|
61
|
+
|
|
62
|
+
The document was created by [Alice] {+my:alice ?my:author}.
|
|
63
|
+
|
|
64
|
+
This demonstrates:
|
|
65
|
+
- Class definitions with rdfs:Class
|
|
66
|
+
- Property definitions with rdf:Property
|
|
67
|
+
- Domain and range constraints
|
|
68
|
+
- Subclass relationships with rdfs:subClassOf
|
|
69
|
+
- Instance data with proper typing
|
|
@@ -1,31 +1,95 @@
|
|
|
1
1
|
[food] <tag:alice@example.com,2026:food/>
|
|
2
|
+
[schema] <http://schema.org/>
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
# Grandma's Apple Pie {=food:apple-pie .schema:Recipe prov:Entity label}
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Traditional family recipe passed down through generations.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Cuisine: [American] {food:cuisine}
|
|
9
|
+
Prep time: [45] {food:prepTime ^^xsd:integer} minutes
|
|
10
|
+
Cook time: [60] {food:cookTime ^^xsd:integer} minutes
|
|
11
|
+
Servings: [8] {food:servings ^^xsd:integer}
|
|
12
|
+
Difficulty: [Medium] {food:difficulty}
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
## Dry Ingredients
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
**Flour** {+food:flour .food:Ingredient ?prov:wasDerivedFrom label}
|
|
17
|
+
**Sugar** {+food:sugar .food:Ingredient ?food:hasIngredient label}
|
|
18
|
+
**Salt** {+food:salt .food:Ingredient ?food:hasIngredient label}
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
### Wet Ingredients
|
|
14
21
|
|
|
15
|
-
|
|
22
|
+
**Butter** {+food:butter .food:Ingredient ?food:hasIngredient label}
|
|
23
|
+
**Eggs** {+food:eggs .food:Ingredient ?food:hasIngredient label}
|
|
24
|
+
**Vanilla** {+food:vanilla .food:Ingredient ?food:hasIngredient label}
|
|
16
25
|
|
|
17
|
-
|
|
26
|
+
### Filling Ingredients
|
|
18
27
|
|
|
19
|
-
**
|
|
28
|
+
**Apples** {+food:apples .food:Ingredient ?food:hasIngredient label}
|
|
29
|
+
**Cinnamon** {+food:cinnamon .food:Ingredient ?food:hasIngredient label}
|
|
30
|
+
**Lemon Juice** {+food:lemon-juice .food:Ingredient ?food:hasIngredient label}
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
## Preparation Steps {=food:preparation .prov:Activity label}
|
|
22
33
|
|
|
23
|
-
|
|
34
|
+
### Step 1: Crust {=food:step-crust .prov:Activity label}
|
|
24
35
|
|
|
25
|
-
|
|
36
|
+
Mixed dry ingredients: [flour] {+food:flour ?prov:used}, [sugar] {+food:sugar ?prov:used}, [salt] {+food:salt ?prov:used}. Cut in [cold butter] {+food:butter ?prov:used} until mixture resembles [coarse crumbs] {food:texture}. Form into [pie dish] {+food:pie-dish ?prov:used}.
|
|
26
37
|
|
|
27
|
-
|
|
38
|
+
### Step 2: Filling {=food:step-filling .prov:Activity label}
|
|
28
39
|
|
|
29
|
-
|
|
40
|
+
Toss [apples] {+food:apples ?prov:used} with [cinnamon] {+food:cinnamon ?prov:used} and [lemon juice] {+food:lemon-juice ?prov:used}. Let sit for [10] {food:restTime ^^xsd:integer} minutes.
|
|
30
41
|
|
|
31
|
-
|
|
42
|
+
### Step 3: Assembly {=food:step-assembly .prov:Activity label}
|
|
43
|
+
|
|
44
|
+
Add filling to crust. Cover with [top crust] {+food:top-crust .food:Ingredient ?prov:used}. Cut [vent holes] {+food:vents .food:Technique ?prov:used}.
|
|
45
|
+
|
|
46
|
+
### Step 4: Baking {=food:step-baking .prov:Activity label}
|
|
47
|
+
|
|
48
|
+
Bake at [375°F] {food:bakeTemp ^^xsd:integer} for [45-55] {food:bakeTime ^^xsd:integer} minutes until [golden brown] {food:color} and [bubbly] {food:texture}.
|
|
49
|
+
|
|
50
|
+
## Recipe Relationships
|
|
51
|
+
|
|
52
|
+
### Variation {=food:variation .prov:Entity label}
|
|
53
|
+
|
|
54
|
+
This recipe is a variation of [Classic Apple Pie] {+food:classic-apple-pie .schema:Recipe ?food:variationOf}.
|
|
55
|
+
|
|
56
|
+
Also related: [Peach Pie] {+food:peach-pie .schema:Recipe ?food:similarRecipe} and [Apple Crumble] {+food:apple-crumble .schema:Recipe ?food:similarRecipe}.
|
|
57
|
+
|
|
58
|
+
## Nutrition Information {=food:nutrition .prov:Entity label}
|
|
59
|
+
|
|
60
|
+
Per serving:
|
|
61
|
+
- Calories: [320] {food:calories ^^xsd:integer}
|
|
62
|
+
- Fat: [14g] {food:fat ^^xsd:string}
|
|
63
|
+
- Carbohydrates: [42g] {food:carbs ^^xsd:string}
|
|
64
|
+
- Protein: [2g] {food:protein ^^xsd:string}
|
|
65
|
+
|
|
66
|
+
## Provenance
|
|
67
|
+
|
|
68
|
+
### Recipe Creation {=food:creation .prov:Activity label}
|
|
69
|
+
|
|
70
|
+
Created by: [Grandma Rose] {+food:grandma-rose .prov:Person ?prov:wasAssociatedWith}
|
|
71
|
+
Documented by: [Alice] {+food:alice .prov:Person ?prov:wasAssociatedWith}
|
|
72
|
+
Date: [2026-05-06] {prov:startedAtTime ^^xsd:date}
|
|
73
|
+
Used: [Family Recipe Book] {+food:recipe-book ?prov:used}
|
|
74
|
+
|
|
75
|
+
Generated: [Recipe Documentation] {+food:recipe-docs ?prov:generated}.
|
|
76
|
+
|
|
77
|
+
This demonstrates:
|
|
78
|
+
- Schema.org Recipe vocabulary
|
|
79
|
+
- Complex ingredient relationships
|
|
80
|
+
- Multi-step process with provenance
|
|
81
|
+
- Nutritional information
|
|
82
|
+
- Recipe variations and relationships
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
- [2.5] {food:amount ^^xsd:decimal} cups
|
|
87
|
+
- [1] {food:amount ^^xsd:decimal} cup
|
|
88
|
+
- [0.5] {food:amount ^^xsd:decimal} tsp
|
|
89
|
+
- [1] {food:amount ^^xsd:decimal} cup, cold
|
|
90
|
+
- [2] {food:amount ^^xsd:integer} large
|
|
91
|
+
- [1] {food:amount ^^xsd:decimal} tsp
|
|
92
|
+
|
|
93
|
+
- [6] {food:amount ^^xsd:integer} medium, peeled, sliced
|
|
94
|
+
- [2] {food:amount ^^xsd:integer} tsp ground
|
|
95
|
+
- [1] {food:amount ^^xsd:integer} tbsp
|
|
@@ -1,46 +1,126 @@
|
|
|
1
1
|
[research] <https://research.example.org/>
|
|
2
2
|
[data] <https://research.example.org/datasets/>
|
|
3
|
+
[prov] <http://www.w3.org/ns/prov#>
|
|
4
|
+
[sh] <http://www.w3.org/ns/shacl#>
|
|
5
|
+
[xsd] <http://www.w3.org/2001/XMLSchema#>
|
|
3
6
|
|
|
4
|
-
#
|
|
7
|
+
# Medical Imaging AI Research {=research:paper .prov:Entity label}
|
|
5
8
|
|
|
6
|
-
|
|
9
|
+
Deep learning analysis of attention mechanisms for medical diagnosis.
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
## Authors {=research:authors .prov:Entity label}
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
Research team with defined roles and contributions.
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
### Primary Author {=research:sarah-martinez .prov:Person label}
|
|
16
|
+
Name: [Dr. Sarah Martinez] {rdfs:label}
|
|
17
|
+
Email: [sarah.martinez@mit.edu] {research:email}
|
|
18
|
+
Role: [Lead Researcher] {research:role}
|
|
19
|
+
Contribution: [Methodology development] {research:contribution}
|
|
13
20
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
### Co-Author {=research:james-liu .prov:Person label}
|
|
22
|
+
Name: [Dr. James Liu] {rdfs:label}
|
|
23
|
+
Email: [james.liu@mit.edu] {research:email}
|
|
24
|
+
Role: [ML Engineer] {research:role}
|
|
25
|
+
Contribution: [Model implementation] {research:contribution}
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
## Research Activity {=research:research-activity .prov:Activity label}
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
Duration: Feb 1-15, 2024
|
|
24
|
-
Association: Dr. James Liu as ML Engineer
|
|
25
|
-
Plan: Training protocol v2.0
|
|
26
|
-
Used: ML Dataset and Kaggle Dataset
|
|
27
|
-
Generated: [trained model] {+research:model ?prov:generated}
|
|
29
|
+
Complete research lifecycle with proper provenance.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
Started: [2024-01-01] {prov:startedAtTime ^^xsd:date}
|
|
32
|
+
Ended: [2024-03-15] {prov:endedAtTime ^^xsd:date}
|
|
33
|
+
Associated with: [Research Team] {+research:authors ?prov:wasAssociatedWith}
|
|
34
|
+
Plan: [Medical AI Research Plan] {+research:plan .prov:Plan ?prov:hadPlan}
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
## Dataset Collection {=research:dataset-collection .prov:Activity label}
|
|
32
37
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
Systematic dataset gathering and validation.
|
|
39
|
+
|
|
40
|
+
### Primary Dataset {=data:primary-dataset .research:Dataset label}
|
|
41
|
+
Source: [GitHub Medical Imaging Repository] {research:source}
|
|
42
|
+
Training samples: [80000] {data:trainCount ^^xsd:integer} DICOM images
|
|
43
|
+
Validation samples: [10000] {data:valCount ^^xsd:integer} DICOM images
|
|
44
|
+
Test samples: [10000] {data:testCount ^^xsd:integer} DICOM images
|
|
45
|
+
Classes: [15] {data:classCount ^^xsd:integer} anatomical structures
|
|
46
|
+
|
|
47
|
+
### Augmented Dataset {=data:augmented-dataset .research:Dataset label}
|
|
48
|
+
Derived from: [Primary Dataset] {+data:primary-dataset ?prov:wasDerivedFrom}
|
|
49
|
+
Resolution: [512x512] {data:resolution} grayscale
|
|
50
|
+
Features: [Patient metadata] {data:features}
|
|
51
|
+
Sample size: [1000] {data:patientCount ^^xsd:integer} patients
|
|
52
|
+
|
|
53
|
+
## Model Development {=research:model-development .prov:Activity label}
|
|
54
|
+
|
|
55
|
+
Training process with resource tracking.
|
|
56
|
+
|
|
57
|
+
Started: [2024-02-01] {prov:startedAtTime ^^xsd:date}
|
|
58
|
+
Ended: [2024-02-28] {prov:endedAtTime ^^xsd:date}
|
|
59
|
+
Used: [Primary Dataset] {+data:primary-dataset ?prov:used} and [Augmented Dataset] {+data:augmented-dataset ?prov:used}
|
|
60
|
+
Associated with: [Dr. James Liu] {+research:james-liu ?prov:wasAssociatedWith} as ML Engineer
|
|
61
|
+
Generated: [Trained Model] {+research:trained-model ?prov:generated}
|
|
62
|
+
|
|
63
|
+
## Model Evaluation {=research:evaluation .prov:Activity label}
|
|
64
|
+
|
|
65
|
+
Comprehensive testing with statistical validation.
|
|
66
|
+
|
|
67
|
+
Started: [2024-03-01] {prov:startedAtTime ^^xsd:date}
|
|
68
|
+
Used: [Trained Model] {+research:trained-model ?prov:used}
|
|
69
|
+
Generated: [Evaluation Results] {+research:eval-results ?prov:generated}
|
|
70
|
+
|
|
71
|
+
### Performance Metrics {=research:metrics .prov:Entity label}
|
|
72
|
+
Training accuracy: [94.5] {research:trainAcc ^^xsd:decimal}
|
|
73
|
+
Validation accuracy: [92.3] {research:valAcc ^^xsd:decimal}
|
|
74
|
+
Test accuracy: [91.8] {research:testAcc ^^xsd:decimal}
|
|
75
|
+
F1 score: [0.89] {research:f1 ^^xsd:decimal}
|
|
38
76
|
AUC-ROC: [0.93] {research:auc ^^xsd:decimal}
|
|
77
|
+
Statistical significance: [p < 0.05] {research:significance}
|
|
78
|
+
Sample size: [1000] {research:sampleSize ^^xsd:integer}
|
|
79
|
+
|
|
80
|
+
## SHACL Validation Shapes
|
|
81
|
+
|
|
82
|
+
### Paper Validation Shape {=research:PaperShape .sh:NodeShape label}
|
|
83
|
+
|
|
84
|
+
Ensures scientific papers meet academic standards. Targets all instances of [Paper] {+research:Paper ?sh:targetClass} to have a [title] {+#title ?sh:property sh:name}, [authors] {+#author ?sh:property sh:name} and [citations] {+#citation ?sh:property sh:name}.
|
|
85
|
+
|
|
86
|
+
### Paper must have exactly one title. {=#title .sh:PropertyShape sh:message}
|
|
87
|
+
Path: [title] {+rdfs:label ?sh:path}
|
|
88
|
+
Required: [1] {sh:minCount sh:maxCount ^^xsd:integer}
|
|
89
|
+
|
|
90
|
+
## Paper must have at least one author. {=#author .sh:PropertyShape sh:message}
|
|
91
|
+
Path: [author] {+research:author ?sh:path}
|
|
92
|
+
Required: [1] {sh:minCount ^^xsd:integer}
|
|
93
|
+
|
|
94
|
+
## Paper must have at least one citation. {=#citation .sh:PropertyShape sh:message}
|
|
95
|
+
Path: [citation] {+research:citation ?sh:path}
|
|
96
|
+
Required: [1] {sh:minCount ^^xsd:integer}
|
|
97
|
+
|
|
98
|
+
### Test Data
|
|
99
|
+
|
|
100
|
+
#### Valid Paper {=research:valid-paper .research:Paper label}
|
|
101
|
+
Title: [Medical Imaging AI Research] {rdfs:label}
|
|
102
|
+
Authors: [Dr. Sarah Martinez] {+research:sarah-martinez ?research:author}
|
|
103
|
+
Citations: [15] {research:citation ^^xsd:integer}
|
|
104
|
+
|
|
105
|
+
#### Invalid Paper {=research:invalid-paper .research:Paper label}
|
|
106
|
+
Title: [Untitled] {rdfs:label}
|
|
107
|
+
Authors: [] {research:citation}
|
|
108
|
+
|
|
109
|
+
## Funding and Provenance
|
|
110
|
+
|
|
111
|
+
### Funding Entity {=research:funding .prov:Entity label}
|
|
112
|
+
Grant: [NRA-2024-12345] {research:grantNumber}
|
|
113
|
+
Amount: [$500,000] {research:amount ^^xsd:decimal}
|
|
114
|
+
Source: [NASA Space Medicine] {+research:nasa ?prov:wasAttributedTo .prov:Organization}
|
|
115
|
+
Period: [2024-2026] {research:period}
|
|
39
116
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Author: at least 1 required
|
|
44
|
-
Citations: at least 1 required
|
|
117
|
+
### Publication Activity {=research:publication .prov:Activity label}
|
|
118
|
+
Published: [Medical Imaging AI Research] {+research:paper ?prov:used} in [Medical Journal] {+research:journal ?prov:wasGeneratedBy}
|
|
119
|
+
Date: [2024-04-15] {prov:startedAtTime ^^xsd:date}
|
|
45
120
|
|
|
46
|
-
|
|
121
|
+
This demonstrates:
|
|
122
|
+
- Complete PROV-O provenance chains
|
|
123
|
+
- Dataset management with XSD typing
|
|
124
|
+
- SHACL validation with self-documenting
|
|
125
|
+
- Academic research lifecycle
|
|
126
|
+
- Proper ontology integration
|