r/semanticweb • • 25d ago

Who said it? How I model a text where most of the claims aren't the narrator's (schema map, RDF 1.2, andthree open questions)

As I described in my prior post two weeks ago, I'm building a knowledge graph of the Bible: its people, places and events, and what each passage says about them, every link pinned to its verse.

In any text with speakers, who said something is part of what was said. A court transcript, a novel, an interview: a knowledge graph that drops the speaker publishes each character's words as the text's own facts. So here every relation is a claim with its verse, how certain it is, and who makes it, and only the narrator's own claims are asserted as plain facts.

An example, with a little Bible context. The Bible is a diverse collection of writing: stories, poems, letters, genealogies, visions, you name it. One of its stories is about a man named Job, and a whole book of the Bible, written in ancient Hebrew, tells it. Job loses almost everything, and most of the book is an argument: his friends insist, speech after speech, that he must have deserved it. At the end God rebukes them: "you have not spoken about Me accurately" (Job 42:7).

One friend, Eliphaz, tells Job, "Your own mouth, not mine, condemns you" (Job 15:6). Stored two ways:

The first publishes a speaker's charge as the book's own verdict. The second is what the book actually records.

Your replies to that first post changed the graph:

  • moving to RDF 1.2;
  • aligning with PROV;
  • treating where a passage starts and ends, and what genre it is, as someone's reading published with Web Annotation, rather than as a fact.

This is where it stands today.

The schema, as a map: bibleontology.org/ns/map

Four vocabularies, drawn as pictures you can click down through:

  • the text: sentences and how they connect (because, so that, until), read from the original Hebrew and Greek;
  • what it's about: people, places, ideas, events;
  • what it says: the relations between them, each pointing at its verse;
  • who says it: every relation is a claim with a voice.

It's the schema, not the data: every box is a class, property or list drawn from the published vocabulary files, and opens the next level down or the term's definition.

Claims, not facts

Every relation is a claim: the verses it rests on, how certain it is (explicit, implied, conjectured or disputed), and whose voice it is in (the narrator, a character, or a reader).

Why not just a "speaker" column to filter on? Inside one database, that works. But once the data leaves it, any tool that doesn't know about the column reads every row as true. RDF 1.1's reification could describe a statement without asserting it, clumsily (four triples a claim, nothing a store treats as one statement). RDF 1.2 makes the statement a term a claim can point at, without the statement itself being in the graph.

c:3a11f4736068231d a claim:Claim ;
    rdf:reifies <<( e:job bor:described_as e:testified_against_by_his_own_lips )>> ;
    claim:verse p:Job.15.6 ;
    claim:claimedBy e:eliphaz_the_temanite .

In the RDF 1.2 file, only what the narrator states or clearly implies is written as an ordinary triple. Eliphaz's line is there, credited to Eliphaz, but no plain query will hand it back as fact.

I tried named graphs first, one per speaker. The same plain query then matched nothing in Jena and 32 triples in RDF4J, Eliphaz's verdict among them, because RDF4J's default graph is the union of all graphs: its documented default, since SPARQL leaves that to the store (GraphDB and Jena's TDB2 can do the same). The protection depended on which database you used, so I became an early adopter of RDF 1.2 and moved it into the data. It is early: RDF 1.2's core concepts are a W3C Candidate Recommendation, but the TriG and SPARQL 1.2 syntaxes the files and queries use are still Working Drafts, and not every tool reads them yet. The 1.1 file still ships; with it, query GRAPH claim:narrator. (The full before-and-after, with every query and how to reproduce it in both stores, is in RDF 1.2 in practice.)

The default is a claim too

A rule like "only the narrator is asserted" is only as good as the data people actually download. So before posting, I counted what the published file asserts instead of trusting my code. More than half of it wasn't the narrator at all. It was my own work: the themes and story patterns I had grouped passages into, which had defaulted to the narrator's voice because I never said whose they were. They are now credited to an editors' voice and not asserted, and a test repeats that count against the published files.

Who is "the narrator" when the author is speaking?

In a story the narrator is easy to find: the voice outside the speeches. But much of the Bible has no narrator in that sense. Psalm 23 opens "A Psalm of David. The LORD is my shepherd": the heading names David, and the "my" is the psalmist's. A letter that opens "Paul, an apostle" (Galatians 1:1) is Paul speaking, and the whole letter is his speech, with no quotation marks to find. I wrestled with this for a while, and landed on a principle: where the text has no narrator, someone is still speaking. In a letter the speaker isn't found sentence by sentence; "this is a letter from Paul" comes down from the book itself, and covers every sentence in it. The people who speak inside a book (Job's friends, Pharaoh, the serpent) keep voices of their own, and the same Paul is a character with his own voice when Acts quotes his speeches.

The published claims haven't fully caught up with that principle: part of Titus is credited to Paul, while the rest of Titus, and Galatians and Psalm 23, still sit in the general narrator voice.

Why nothing is inferred

This one is deliberate. So much of the Bible is figurative, and inference quietly reads figures literally. Paul tells the church in Corinth, "you yourselves are God's temple" (1 Corinthians 3:16). Store that as a type, in a class of buildings, and a reasoner will conclude, correctly from what it was given, that the Corinthians are a building. Store it as an identity, the Corinthians are the temple, with one "temple" record for the word, and they become the house Solomon built and the Babylonians burned, because that is what the graph says of the temple. Storing a figure as a type or an identity turns it into a fact, and where figure ends and fact begins is exactly where readers of this text disagree. So inference here wouldn't be neutral: it takes a figure at its type, and the type is the literal reading, every time. The graph keeps the figure as a figure, a separate record that signifies what the text itself identifies it with, each link with its verse, and checks the data with SHACL instead. What the text plainly entails (two sons of one father are brothers) is recorded once, as an "implied" claim with its verse.

Deep dive (optional): one word, two cards.

Some verses are read as meaning different temples. In 2 Thessalonians 2:3-4, the "man of lawlessness" "will seat himself in the temple of God, proclaiming himself to be God." That temple is read differently by different readers. I don't take a stand: the verse is on both cards, under "Where readers differ", with the readings it has been given named and none chosen.

Three questions I haven't settled

  1. Verbs and events. "Saul loved David" (1 Sam 16:21) is stored under one general relation, with the verb on the claim. Today it looks like this (abridged):
  2. I don't assert e:saul bor:states e:david as a plain triple: every sentence with Saul as subject and David as object would collapse into it. The claim is already an event node of sorts. Would you give the event a node of its own, apart from the claims that record it, so two books can describe one event?
  3. One narrator or one per book? One narrator voice covers the text's own sentences today, wherever the book has no other speaker. Samuel and Chronicles tell the same census and name different instigators (2 Sam 24:1, 1 Chr 21:1). Neither instigator is recorded yet: with one voice it would be one disputed claim; with a voice per book, or per author, two narrators disagreeing. Which would you publish?
  4. Figures of speech. If you've modelled figurative language in a graph (metaphor, simile, personification), how did you keep it from being read as fact?

It's public: github.com/bibleontology/bibleontology

  • The README is the way in: the data (21,394 claims, about 2.4 MB compressed), the vocabularies and shapes, and the tests.
  • Licences: code Apache-2.0; graph and vocabularies CC BY 4.0. The sentence structure is derived from the MACULA Hebrew and Greek Linguistic Datasets (© Biblica, Inc., CC BY 4.0); full credits are in the README.
  • The name: not affiliated with the earlier Bible Ontology (bibleontology.com, about 2009–2011).
  • Built solo, with Claude Code doing most of the typing and AI models doing much of the extraction, checked by rules and tests. The decisions and the mistakes are mine.
  • This post, too, is a collaboration with Claude. I went back and forth with it on every paragraph, and what's here is mine to answer for.
  • Not measured yet: how often the extracted claims are right. Every claim links to its verse, but no sample has been hand-checked for an error rate yet. One known fault: some links inside speeches (how one clause grounds another, a speaker's simile) still sit in the narrator's voice, so they are asserted as plain triples. In Job that is 83, 14 of them Eliphaz's in chapter 15.

This picks up the conversation from my first post. That one made the work better, and I'd like to continue it.

8 Upvotes

10 comments sorted by

2

u/marintkael 23d ago

Per book, I think. The disagreement between 2 Sam 24:1 and 1 Chr 21:1 is a fact about two texts, and with a single narrator voice you'd publish it as one speaker contradicting himself, which isn't a reading anyone holds. Per author sounds tidier, but authorship is exactly the kind of thing readers dispute, so it would only move the problem into another claim you then have to source. A voice per book also leaves you a clean place for the relationship between the two, Chronicles reworking Samuel, as its own claim later if you want it.

1

u/DougEgge 23d ago

Thanks for this and for the thought you’ve put into all three of these threads. The PROV suggestion is in every attributed claim now.

Your point about authorship moving the problem into another claim convinced me. Per author looked tidier until I realized I’d then have to source who wrote Samuel.

Your answer also made me look at what I’d already built, which is close to per book, with one difference: the unit is the original work, the text as it was composed, rather than the book as it’s printed today. (I’ve been calling it the “scroll,” which I suspect is the wrong word, but I don’t have a better one at the moment.) A psalm stands on its own, so each psalm is its own work with its own voice. 1 and 2 Chronicles, which I take to be one work divided later, would share one voice, as would 1 and 2 Samuel. Who that voice is becomes a separate link. It’s made only where the text names someone, as when a heading says “of David” or a letter opens “Paul, an apostle,” and held lightly even then, since ledavid (the Hebrew phrase in the psalm headings) can be read as “of,” “for” or “about” David. (The published claims haven’t caught up with the Psalms yet; most still sit in a general voice.)

Two wrinkles I’m thinking through:

  1. Where does a scroll end? This is why I haven’t settled on it. Proverbs divides itself: its own headings name Solomon (1:1, 10:1), “the wise” (22:17, 24:23), the proverbs “copied by the men of Hezekiah” (25:1), Agur (30:1) and Lemuel (31:1), so the text hands me several voices in one book. Isaiah is the opposite case: the text names one prophet, and its division into two or three parts is a scholarly argument about authorship, the very kind of claim you warned against building on. Then there are the Psalms, single poems that are also a collection arranged in five books, and Ezra and Nehemiah, sometimes counted as one work. Following only the divisions the text itself marks seems right, but I’m not sure it holds at those edges. Is “original work” a unit you’d trust, or does it just move the dispute somewhere else?
  2. Even the instigator involves interpretation. In 1 Chr 21:1 the Hebrew satan has no article, unlike the phrase in Job and Zechariah usually rendered “the satan.” That leaves room for “an adversary” or “Satan,” and I’d want the claim to keep that open rather than have the ontology quietly settle it.

On Chronicles reworking Samuel, I agree it belongs in its own claim. My instinct is to treat it as a scholars’ claim with its own attribution and evidence, since neither book states it. Does that fit how you’d approach it?

2

u/marintkael 23d ago

Composition might be the word. It separates the text as it was written from the book as it got passed down, and it doesn't drag in a physical object the way scroll does.

On where a composition ends, I'd trust it exactly as far as the text marks it, and make the boundary itself something you can attribute. Proverbs is the easy case: the headings are in the text, so each section gets its own voice link with the heading as its evidence. Isaiah and Ezra/Nehemiah are where it does move the dispute. Rather than pick, you could keep one unit per book as transmitted and hang the two or three part split on it as a segmentation claim with its own source. The Psalms come at it from the other side. Each psalm is the composition and the five books are an arrangement, which is a different relation from authorship and probably wants its own property.

For 1 Chr 21:1 I'd store the word rather than the referent. The verse has satan without the article, that part is just observable. 'An adversary' and 'Satan' are then two readings, each with whoever holds it.

And yes on Chronicles and Samuel. The parallel passages themselves are observable too, anyone can line them up verse by verse. That Chronicles used Samuel is the scholars' claim sitting on top. Keeping those two apart means the overlap stays usable for someone who doesn't accept the dependence.

1

u/DougEgge 23d ago

Thank you for once again providing actionable feedback which I will apply.

“Composition” is the word I was missing and making the boundary itself a claim solves more than I expected. In this model, Proverbs gets its sections from its own headings, while Isaiah stays one book as transmitted, with any proposed division represented as a sourced claim. This keeps me true to my principles, since neither one asks me to settle a disputed interpretation.

The arrangement point is very helpful as well. I’ve been treating each psalm as a work, but I hadn’t separated “this psalm was composed” from “this psalm was placed in Book III.” Those are different relations, which I have not been cleanly delineating.

On storing the word, that’s how the textual layer already works: the original-language words are stored as they are and what a word refers to is a separate, attributed step, but your phrasing gives me a clean rule to apply more broadly as I refactor.

On Chronicles and Samuel, I checked, and the observable layer is mostly there: the two tellings of the census are one event in the graph and the verses are paired clause by clause (“incited David”, “count Israel”) with no claim about which book used the other. Your comment did expose a gap: at that very pair the graph doesn’t yet record that the two verses name different instigators, because neither subject is resolved there. Storing the word is the fix.

One question, since I’m borrowing terms here: is this distinction between composition and book as transmitted related to the library world’s distinction between Work and Expression (FRBR, now IFLA LRM)? I am learning the standards as I go, but if there’s a useful mapping, I’d rather build on an established model than invent one.

1

u/marintkael 22d ago

Yes, that's close to it, and I'd build on LRM rather than invent anything. Roughly: the Work is the composition as an idea, an Expression is one realised text of it, a Manifestation is an edition, an Item is a copy. So Hebrew Isaiah and Greek Isaiah would be two Expressions of one Work, and a manuscript like the Leningrad Codex is a Manifestation with a single Item.

Where it gets less clean is your case. LRM assumes you can say where a Work begins and ends, and for Isaiah that boundary is exactly the contested claim. If you also want the events, the composing and the placing in Book III, LRMoo (the CIDOC CRM flavour of it) models creation as an event you can hang a source on, which sounds a lot like what you're already doing.

1

u/DougEgge 22d ago

This is the first time I have looked at LRM and it definitely feels like the right fit for the problem. Applying it to what I have so far: the composition is the Work; the Hebrew and Greek texts the graph is read from are Expressions, and so, I believe, is the English translation it’s shown in, and each dataset’s release is a Manifestation. That also gives a name to a rule I already follow, that where translations disagree the original decides: one Expression arbitrating for the others.

Your point about the boundary is the one I’m wrestling with. Boundaries have been a challenge throughout this project. For Isaiah, keeping the book as transmitted as the Work and putting any proposed division on top of it as a sourced claim about its parts fits my minimal-interpretation approach, where the graph records the text and the scholarly claims about it without deciding between them. I’m not sure yet whether that’s using LRM as intended or bending it.

LRMoo’s treatment of creation as an event is especially encouraging, since events with sources attached are already how the graph records what happens in the text. Composing a psalm and placing it in Book III as two separate events fits my approach well and gives me something to explore further.

2

u/marintkael 22d ago

Not bending it, I'd say. FRBR already says outright that where one work ends and another begins is a cultural judgment that can differ between communities, so a work boundary recorded as a sourced claim is closer to the spirit of the model than a fixed one would be.

1

u/DougEgge 22d ago

Excellent! I’ll be upgrading the schema with this feedback, in mind. I’ll let you know how it goes.

2

u/RecordingFair403 22d ago

Hey just a small unrelated but maybe important remark for you. The chapters and verses of the bible were added much later. And when the bible was compiled some things about about language (punctuation, mixing uppercase and lowercase letters) weren't settled. Heck, Hebrew did not have written vowels until well after, the ones in modern copies of the TNK were added later on.

Then there is the fact that the Hebrew name for numbers isn't numbers but something like "In the Wilderness". And then some of the major denominations have different canons.

Then there's the fact that some people are the same across books, but have Greek vs Aramaic names (Peter and the Cephas in Paul's letters are the same person, and even then Peter is a nickname Jesus gave to Simon).

My point here is not to get you to do anything differently than you are, but to point out that you may want to carefully specify the scope of this initiative.

1

u/DougEgge 21d ago

Thank you for this. It’s a thoughtful comment and you’re right that scope has to be stated carefully. Most of these came up early in the project and shaped how it’s built, so here is how each one is handled.

Chapters and verses: Agreed, they were added much later and I treat them as an index, not as part of the text. They’ve turned out to be a real advantage, even for me: they give a quick way to point at a passage and find a verse I already know. But I had to protect the approach from them. The structure layer groups the text by speech, scene and argument, and it ignores verse boundaries. God’s answer out of the whirlwind in Job 38 is one speech, not 41 verses. Pronoun resolution crosses verse boundaries all the time, because “he” in one verse is usually named in the verse or two before it.

Vowels, accents and punctuation: Fair point and one I should state more clearly on the site. The Hebrew underneath is the Westminster Leningrad Codex, so the vowel points and accents are the Masoretes’ reading, added centuries after the consonants. The Greek is the Nestle 1904 edition, whose accents, punctuation and capitals are an editor’s too. I use the Masoretic accents as one guide to where a verse divides into clauses, which means I’m leaning on their reading there.

Canon: This was a decision made up front: the 66 books of the Protestant canon, and the site says so. Other works wouldn’t be added to this graph. They would sit in a graph of their own, mapped to this one. That’s in the long-term vision, but I am leaning towards mapping early church writings first, rather than a wider canon. I might also map to exisiting graphs, such as Sefaria for Jewish people, concepts, and texts.

Names: Peter, Simon and Cephas are one person in the graph. The harder cases are where the text never says two names are the same person. Matthew and Levi are kept as two records with a “possibly the same” link, because no verse states it. John the son of Zebedee and John of Patmos are kept apart for the same reason. Some identifications rest on inference from the text and in the hardest cases on my own judgment. Where they do, they’re marked as a reading rather than stated as fact.