Graph schema validation at last? Revisiting the Stemmarest data model with Neo4J and SHACL

Tara Lee Andrews · Digital Humanities 2023 (DH2023), Graz · 2023 · digital-humanities · 10.5281/zenodo.8107471 · record stemmarest2023-shacl
tag layer · index · concepts · authors · עברית
Where this record's text came from. The DOI recorded for this paper was the Book of Abstracts DOI, which identifies the volume and not the paper; moved to container_doi. faceted 2026-08 by reading the locally held text (xml); every evidence string verified as an exact substring of that text before merging. Short DH2023 conference abstract (~980 words), XML-derived and cleanly extracted; every quote above was substring-verified against the file. Claim type is a judgement call: roughly half the text is a critique of OWL/ontologies as a validation model, and 'critique' would also be defensible, but the forward-looking contribution the title promises ('Graph schema validation at last?') is a way of doing validation, so 'method' was chosen. 'method' facet = review because the piece reports the outcome of a prior project and surveys two recent Semantic Web developments rather than presenting new data, a system build, or an evaluation; there is no implementation, benchmark, or worked SHACL schema in the text, so the claim that SHACL solves the problem is asserted and illustrated by example, not demonstrated. The Vogeler relation is typed 'extends' because the paper accepts his observation and offers a different explanation of it; the parenthetical shows mild disagreement, so 'contradicts' is a near-miss alternative. No numbers, no data, no evaluation, so nothing quantitative could be faceted. 2026-08-12 and 2026-08-15 schema-0.3 passes: every quote verified as an exact substring of the staged text and anchored at merge time; concept terms verified present; every edge endpoint an existing node.
This record’s own method is review, and the tags below follow from that. A review’s findings, quantities and statistics are things stated IN this paper, and some of them report results obtained elsewhere. No tag on this page names a different author. Measured across every review in this corpus, 81% of a review’s tags carry no citation at all — most of them are the review speaking. The corpus does not adjudicate the rest: read an unmarked tag as a claim this paper makes, not necessarily one it made first.
How to read this page. The article text below is reproduced exactly as it was staged; nothing in it has been rewritten. Coloured stretches are tagged. A solid underline means the tag records the paper's own words. A dotted underline means the tag text is the tagger's sentence about the paper — the quotation is the paper's, the wording of the tag is not. Every superscript label links to that tag's row in the table at the foot of the page. The machine-readable edition of the same thing is the TEI file beside this one, where the tags live in standOff. When we have changed our mind. Some entries in the table begin with a word in capitals and the reason for it. EVIDENCE CORRECTED — the finding still stands, but we had quoted the wrong sentence from the paper, and the quotation has been replaced with the right one. RETRACTED — the entry itself was wrong; it stays on the page, marked, with the reason, rather than being deleted. WITHDRAWN AND REPLACED — the entry was wrong, and a corrected version of it appears in the entries below. Each mark carries its own reason, in brackets, because the reasons differ from one entry to the next. An entry we have WITHDRAWN is removed from this page and kept in the record, with its reason. A line reading Audit and a date is a later re-reading of the entry against its whole sentence: DOUBTFUL means it was kept, and the reason says what is loose about it. Quotation marks inside the tagger's sentence. Where a tag is the tagger's own sentence, a phrase in quotation marks inside it is borrowed from the paper — the tagger's wording around it is not. The paper's own sentence is the evidence quote shown on the same row, so the borrowing can be checked against the thing borrowed from without leaving this page. Nothing inside quotation marks anywhere on this page is ours: if it is quoted, it is the paper's. Whose words a concept carries. A concept entry records a term the paper itself uses, so the term, the sense given for it, and its evidence are the paper's own words, quoted where the paper fixes them. This is the opposite of a sense entry in the tag table, which is the tagger's sentence about how the paper uses a term. Where a concept entry could not be grounded in the paper's words, the entry says so on its own row.
Other fields define these differently the same word, defined another way in another discipline
interoperability 6 fields · ontology 4 fields · sustainability 2 fields

Tags on this paper

Every tag the record carries, each linking to every other paper in the corpus that carries it. A tag appears here whether or not its words occur in the article — the spans below are only the ones a sentence in this paper licenses. Of the 19 concept tags on this paper, none is grounded in a quoted sentence. 14 carry the tagger's gloss of what the term means in this paper, which is not something the article can license.
variant graph ontology schema validation SHACL OWL RDF* Neo4J Stemmarest property attributes witness stemma tradition critical apparatus digital scholarly edition interoperability sustainability codework SPARQL TEI XML review

Legend

second readingalternativesan independent re-reading of a facet, recorded whether or not it agrees
relation to other workclaim_relationshow this paper stands to another: agrees, contradicts, extends, qualifies
claim typeclaim_typethe shape of the claim: existence, mechanism, method, critique, prediction, null
concept edgeconcept_edgesan asserted relation between two concepts, with the sentence asserting it
content tagcontent_tagsa finding, definition, quantity, statistic or variable named in the paper
limitationlimitationswhat the paper says its evidence cannot support
mechanismmechanismshow the reported effect is said to come about
methodmethodhow the paper produced its evidence
object of studyobject_of_studywhat the paper is about — the thing it investigates
phenomenonphenomenonthe effect or regularity under study
sensesensesa distinct use of a term, quoted where the paper fixes it

The paper, tagged

The reference list is not part of the text we hold for this paper. Our copy was extracted from the publisher's page and the bibliography did not survive that extraction, so the article below ends before its references. Nothing has been removed by us.

object_of_studyconcept_edgesIn 2020 there was an attempt to create an ontology (Andrews, 2020) for content_tags↗content_tags↗the variant graph, which is a data model used in tools such as CollateX (Haentjens Dekker et al., 2015), Stemmarest (Andrews, 2019), and TraVIZ (Jänicke et al., 2015) to represent and visualize text collations and certain sorts of annotation. limitationsconcept_edgescontent_tagsThe conclusion was that the ontology was not suitable for expressing the full data model employed in variant graphs, not least because all of them (Stemmarest most heavily) content_tagsrely on property attributes, which RDF and OWL do not handle well and which can therefore not be suitably represented in an ontology definition.

concept_edgesIndeed, although ontologies have in the meantime been proposed for various aspects of digital scholarly edition (NIE-INE, 2019) and specifically for critical apparatus (Giovannetti, 2021) and an opportunity to discuss these together would be very welcome, one major motivation for undertaking the 2020 project at all was to address the concerns, frequently heard by the author in a very heavily XML-based community, that since graph databases do not tend to have schemas and certainly have no way to enforce these schemas, content_tagsthey lack the foundations for sustainability and interoperability that TEI XML schemas or, indeed, relational database schemas provide. Many of those who expressed concerns went on to point to ontologies as examples of schemas that can be used to validate RDF data.

claim_relationsclaim_relationscontent_tagsWhat the 2020 project showed, in the end, was the inadequacy of ontologies and especially OWL as a validation model for graph-based data. sensesWhile many of the classes used by Stemmarest and their relationships to each other can be described adequately in OWL, the model relies upon many additional constraints that, while seemingly simple, go beyond OWL’s capabilities. concept_edgesconcept_edgesFor example, in the Stemmarest ontology we can say that a Witness can belong to a Tradition and also to one or more Stemmata, and that a Tradition can contain multiple Stemmata. sensesHowever, one of the important aspects of validation is to prevent inattentive mistakes in the data model. mechanismsFor example, if a witness W appears in a stemma belonging to tradition A, the model software should ensure that W also belongs to tradition A as a witness and not, for example, an unrelated tradition B; moreover, W should not appear in any stemmata of tradition B. mechanismssensesEven more intractable problems arise with more complex specifications: for example, the need to ensure that the variant graph is self-consistent, so that a user cannot create a situation in the model where a portion of the edited text loops back onto itself or is omitted altogether. mechanismslimitationscontent_tagsThus, while the Stemmarest ontology can describe the data reasonably well, it is not an adequate tool for setting constraints; these must still be described in code.

sensesclaim_relationsVogeler (2021, p. 80) notes in his discussion of graph-based models for critical edition that “the formal affordance of OWL is not really exploited in Digital Scholarly Editions”. mechanismssensesclaim_relationsWe would argue here that most editors are less interested in the sort of open-world inference for which OWL was intended (though Vogeler makes a case for why it might be interesting), as opposed to the formalisation, description, and consistency of their data. phenomenonclaim_relationsIn this sense, the critics of graph-based models do have a point; how do we validate our graphs? limitationssensesConstraint enforcement in Neo4J, perhaps the most popular graph database, is indeed limited strictly to data properties of nodes and relationships (Neo4J, Inc., 2022). limitationsThe situation is hardly better for LOD stores, which have so far depended more or less entirely on ontology specifications, with limitations as described above, to describe their data.

method↗Recently, however, there have been two intriguing developments in the Semantic Web world that are especially relevant to digital humanities projects, not least Stemmarest. The first of these is content_tags↗RDF*, an extension to RDF that allows an entire triple to be the subject or object in further triple statements (Arndt et al., 2021). limitationslimitationsclaim_relationsconcept_edgescontent_tagsWhile it is still in an early phase of development, RDF* provides the long-awaited ability to set context for LOD statements, and promises to triple stores the same ability to set properties on relationships that graph databases such as Neo4J have always provided; this in turn has opened the way for Stemmarest, and many other projects besides, to take advantage of Neo4J’s powerful graph traversal and analysis algorithms while preserving full interoperability with LOD formats.

alternativesThe second major development is content_tags↗SHACL (Shapes Constraint Language), a language whose purpose is to define a set of constraints against which RDF graphs can be validated (Knublauch and Kontokostas, 2017). claim_typemechanismsclaim_relationsconcept_edgescontent_tagsThis language solves exactly the problem that ontologies do not; specifically, in conjunction with a database that supports transactions and their rollbacks such as Neo4J, a set of SHACL constraints can ensure the consistency of data added to the graph, so that (to take the example above) a witness from one text tradition cannot be included in a stemma belonging to an entirely different tradition.

Perhaps the most intriguing feature of SHACL is the ability to include “constraint components” expressed in SPARQL or Javascript, providing more or less limitless possibilities for formalising complex models. mechanismslimitationsIn a sense, this affordance challenges the idea of the separation of program code and data that is the usual gold standard for sustainability efforts, insofar as constraints can be expressed as arbitrarily complex programming logic, embedded in RDF or Turtle files and saved as a schema alongside the data itself.

claim_relationsThe SHACL model thus provides a fascinating way to bring the intellectual contributions inherent in codework (Zundert, 2016; Antonijevic Ubois, van Zundert, and Andrews, 2018) across the “sustainability divide” that allows them to be properly valued and conserved as scholarship; at the same time, it points to a promising future model of digital work in the humanities, in which domain-specific code can live alongside the data, to be processed by more generic (and thus, hopefully, more long-lived) software platforms.

Every tag on this page

alternatives 1 · claim_relations 8 · claim_type 1 · concept_edges 7 · content_tags 11 · limitations 7 · mechanisms 6 · method 1 · object_of_study 1 · phenomenon 1 · senses 6

Relations on this page carry a quotation for the claim. Where a relation was separately evidenced — and so tested against the vocabulary for its type — the row says so; none of 7 relations here carry that mark. The rest are the tagger’s reading of the sentence quoted beside them.

This record holds no controls. A layer is empty when the tagger recorded nothing in it — which is not the same as the paper having nothing to record.

facettagfieldconf.whose words
object_of_studyThe variant graph data model used to represent text collations, and whether its constraints can be expressed formally.object_of_studythe paper's words
claim_typemethodclaim_typethe paper's words
phenomenongraph schema validationphenomenonthe paper's words
methodreview
also in: review
methodthe paper's words
mechanismsAn ontology describes what kinds of thing exist and how they relate, but cannot forbid a combination that is well-typed and still wrongmechanisms[0]the tagger's words
mechanismsThe hard constraints are cross-object: an entity appearing in one structure must be consistent with its membership elsewheremechanisms[1]the tagger's words
mechanismsSome constraints are global properties of the whole graph and cannot be checked object by object at allmechanisms[2]the tagger's words
mechanismsThe original failure was not a modelling mistake but a mismatch of purpose - OWL was built for open-world inference and editors want description and consistencymechanisms[3]the tagger's words
mechanismsConstraints only bite if the store can undo a rejected write, so validation needs transactions and rollback underneath itmechanisms[4]the tagger's words
mechanismsAllowing arbitrary code inside constraints erases the code/data boundary that sustainability practice depends on, which the author treats as a featuremechanisms[5]the tagger's words
limitationsThe author's own earlier Stemmarest ontology describes the data adequately but cannot express the model's constraints, which still have to be written in program code.
what this limits: any use of the ontology to enforce the model: WHILE THE STEMMAREST ONTOLOGY CAN DESCRIBE THE DATA REASONABLY WELL, IT IS NOT AN ADEQUATE TOOL FOR SETTING CONSTRAINTS; THESE MUST STILL BE DESCRIBED IN CODE
limitations[0]the tagger's words
limitationsRDF*, the extension the interoperability half of the proposal depends on, is acknowledged to be immature.
what this limits: the interoperability half of the proposal: RDF* IS STILL IN AN EARLY PHASE OF DEVELOPMENT
limitations[1]the tagger's words
limitationsSHACL's SPARQL/Javascript constraint components undermine the separation of code from data that sustainability practice normally treats as the gold standard.
what this limits: the sustainability claim for SHACL: constraint components CHALLENGE THE IDEA OF THE SEPARATION OF PROGRAM CODE AND DATA THAT IS THE USUAL GOLD STANDARD
limitations[2]the tagger's words
limitationsThe 2020 ontology attempt failed because RDF and OWL handle property attributes badly, and the model depends on them
what this limits: any RDF/OWL serialisation of a property-bearing graph: THE ONTOLOGY WAS NOT SUITABLE FOR EXPRESSING THE FULL DATA MODEL ... NOT LEAST BECAUSE ALL OF THEM ... RELY ON PROP[erty attributes]
limitations[3]the tagger's words
limitationsThe graph database's own constraint mechanism reaches only data properties, not structure
what this limits: the graph-database alternative: CONSTRAINT ENFORCEMENT IN NEO4J ... IS INDEED LIMITED STRICTLY TO DATA PROPERTIES OF NODES AND RELATIONSHIPS, not structure
limitations[4]the tagger's words
limitationsThe extension that would fix the property problem is not yet mature
what this limits: the same scope as limitations[1] - the fix for the property problem is immature
limitations[5]the tagger's words
limitationsLinked-data stores are in no better position, having relied on ontologies alone
what this limits: the linked-data alternative: LOD STORES ... HAVE SO FAR DEPENDED MORE OR LESS ENTIRELY ON ONTOLOGY SPECIFICATIONS, WITH LIMITATIONS AS DESCRIBED ABOVE
limitations[6]the tagger's words
sensesschema - as DESCRIPTION: says what classes exist and how they may relate, which an ontology does wellsenses[0]1.0the tagger's words
sensesschema - as CONSTRAINT: forbids configurations that are well-typed and still wrong, which is what validation actually needssenses[1]1.0the tagger's words
sensesthe graph problem - LOCAL: a property on a single node or relationship, which Neo4J can already enforcesenses[2]1.0the tagger's words
sensesthe graph problem - GLOBAL: a property of the whole graph, such as the edited text not looping back on itself, which nothing local can checksenses[3]1.0the tagger's words
sensesOWL's purpose - as intended: open-world inference, deriving new facts from stated onessenses[4]1.0the tagger's words
sensesOWL's purpose - as wanted by editors: formalisation, description and consistency, which is a different job it was not built forsenses[5]1.0the tagger's words
alternativesclaim_type: method
a second reading reaching the same value. Recorded: method — note: a second reading reaching the same value from a different sentence. Not applied - a person decides.
alternatives.claim_typethe tagger's words
claim_relationsbuilds-on → Andrews (2020), the 2020 attempt to build an ontology for the variant graph / Stemmarestclaim_relations[0]the tagger's words
claim_relationsextends → Vogeler (2021) on graph-based models for critical edition and the unexploited affordance of OWLclaim_relations[1]the tagger's words
claim_relationsbuilds-on → SHACL (Shapes Constraint Language), Knublauch and Kontokostas (2017)claim_relations[2]the tagger's words
claim_relationsbuilds-on → RDF* (Arndt et al., 2021)claim_relations[3]the tagger's words
claim_relationscritiques → the author's own 2020 attempt to build a variant-graph ontologyclaim_relations[4]the tagger's words
claim_relationscritiques → the argument that graph databases lack the sustainability foundations of XML or relational schemasclaim_relations[5]the tagger's words
claim_relationsextends → Vogeler on graph-based models for critical editionclaim_relations[6]the tagger's words
claim_relationssupports → the codework literature arguing that code embodies scholarshipclaim_relations[7]the tagger's words
concept_edgesSHACL —contrasted-with→ ontology
strength of the relation: 1
also in: SHACL · ontology
concept_edges[0]the tagger's words
concept_edgesRDF* —operationalised-as→ property attributes
strength of the relation: 1 Audit 2026-09-28: DOUBTFUL - read against its span and kept, but RDF* allows properties on relationships; operationalised-as 'property attributes' is the wrong type.
concept_edges[2]the tagger's words
concept_edgesproperty attributes —distinct-from→ OWL
strength of the relation: 1 Audit 2026-09-28: DOUBTFUL - read against its span and kept, but OWL does not handle property attributes; distinct-from paraphrases an inability.
concept_edges[3]the tagger's words
concept_edgeswitness —part-of→ tradition
strength of the relation: 1
also in: witness · tradition
concept_edges[4]the tagger's words
concept_edgesEVIDENCE CORRECTED (RE-GROUNDED) · stemma —part-of→ tradition
EVIDENCE CORRECTED: RE-GROUNDED. The old span attested 'stemma' only inside 'Stemmarest', the TOOL'S OWN NAME - a run of letters, not the word. This clause writes both terms and states the containment in the paper's own verb: a stemma BELONGS TO a tradition. — strength of the relation: 1
also in: stemma · tradition
concept_edges[5]the tagger's words
concept_edgesStemmarest —operationalised-as→ variant graph
strength of the relation: 1 Audit 2026-09-28: DOUBTFUL - read against its span and kept, but Stemmarest USES the variant graph model; operationalised-as is the wrong type.
concept_edges[8]the tagger's words
concept_edgescritical apparatus —part-of→ digital scholarly edition
strength of the relation: 1 Audit 2026-09-28: DOUBTFUL - read against its full span and kept, but the span says ontologies were proposed for aspects of digital scholarly edition and specifically for critical apparatus; part-of is loose.
concept_edges[11]the tagger's words
content_tagsAn ontology could not express the variant graph model, because the model relies on property attributes that RDF and OWL handle badly.content_tags.findings[0]the tagger's words
content_tagsThe 2020 project showed that ontologies, and OWL in particular, are inadequate as a validation model for graph-based data.content_tags.findings[1]the tagger's words
content_tagsThe concern being answered is that graph databases lack the schema enforcement that gives XML and relational data their sustainability and interoperability.
about this quote: THE QUOTE IS A CONCERN THE PAPER SETS OUT TO ADDRESS, NOT ITS FINDING - it completes a sentence that says the project was undertaken 'to address the concerns, frequently heard' that.
content_tags.findings[2]the tagger's words
content_tagsan ontology can describe the model adequately and still be unable to constrain it, leaving the constraints in codecontent_tags.findings[3]the tagger's words
content_tagsthe failure traces to RDF and OWL handling properties on relationships badlycontent_tags.findings[4]the tagger's words
content_tagsRDF* supplies the missing ability to put properties on relationships, though it is earlycontent_tags.findings[5]the tagger's words
content_tagsSHACL constraints plus a transactional store can enforce the cross-object consistency an ontology cannotcontent_tags.findings[6]the tagger's words
content_tagsvariant graph
also in: variant graph
content_tags.definitions[0]the tagger's words
content_tagsSHACL
also in: SHACL
content_tags.definitions[1]the tagger's words
content_tagsRDF*
also in: RDF*
content_tags.definitions[2]the tagger's words
content_tagsvariant graph
also in: variant graph
content_tags.definitions[3]the tagger's words

Interpretive choices

Tags that could not be placed in the text:

What was deliberately not tagged, and why, is recorded per paper by the tagger. Where a paper has no such record, this page says so rather than implying that nothing was declined.

© 2026 Shir Sivroni · ORCID 0009-0000-2597-2824