Where it started · NLP · Citation analysis · Web app
Quotation profiles
Which parts of a historical text does the scholarship on a topic actually lean on? I pulled every citation to Hume’s Treatise of Human Nature out of about a hundred papers on personal identity and pinned each one to the paragraph it points at. The result is a map of the topic drawn by the scholars themselves.
So far: about 2,760 citations, 29% of them on 1.4.6, Of personal identity, and 13% on the Appendix. Of the 56 papers with enough citations to compare, nine are both focused and surprising, and 47 paragraphs cited by three papers or fewer are the candidate “novel passages” the project set out to find.
Hume’s Treatise is enormous: three books, each in three or four parts, each with seven to seventeen sections, plus an Appendix and an Abstract added more than a year after publication. A newcomer who wants to understand Hume on personal identity doesn’t know where to start. A specialist writing on the topic doesn’t always know who else has worked on the same passages.
My premise was simple. You can see where a philosophical topic lives in the Treatise by looking at where the experts cite it when they write about that topic. So I needed two things: a paragraph-level map of the Treatise, and a set of publications that someone other than me had already decided were “about” personal identity.
Defining the literature
I didn’t want to pick the papers myself. PhilPapers keeps expert-curated topic leaves, and its leaf on Hume on Personal Identity held 143 publications in June 2020, in several languages. I processed 101 of them, everything I could get in a usable digital form, some through interlibrary loan one chapter at a time. For books I used judgment: a book wholly about the topic went in whole, and otherwise only the relevant chapters did. The collection runs from 1955 to 2019, and about a quarter of it comes from Hume Studies.
The map of the text came from the Hume Texts Online edition, which numbers every paragraph. That gave 1,375 paragraphs in 93 sections, so a citation could be scored at either grain.
Pulling the citations out
Hume scholars cite the Treatise in at least four ways, and they changed their habits over the decades. The extraction works down a ladder, from the forms I’m sure of to the ones I’m not:
Norton structural references like 1.4.6.4, in lists and ranges, sometimes with Roman numerals for the book or part.
Explicit page references to the Selby-Bigge/Nidditch edition, like (SBN 252). Newer work often gives both forms, so a citation mustn’t be counted twice.
Marked page references like (T 252) or (THN 252), common in Hume Studies.
Bare page numbers like (252), which are everywhere in older work and might point at anything.
Strict search takes only the first three. Aggressive search adds bare page numbers with two or three digits. I dropped single digits after finding that (1), (2) and (3) made the Treatise’s short Introduction look as important as the section on personal identity itself. Page numbers become paragraphs through SBN-to-Norton concordance tables I built for the purpose.
Scoring and comparing
Every citation is worth one point, spread over the paragraphs it names. Each paper ends up with a score sheet over all 1,375 paragraphs, in eight versions (strict or aggressive, raw or relative, paragraph or section). Two papers are compared by the share of their citations that go to each location, so their distance runs from 0 (identical profiles) to 200 (no overlap). The literature as a whole is the sum of every paper’s sheet, so any one paper can be measured against the field.
What the map shows
Under strict search, about 2,760 citation points fall heavily on a few sections:
1.4.6Of personal identity29%
AppendixHume admits the account fails13%
1.4.2Of scepticism with regard to the senses11%
1.4.5Of the immateriality of the soul7%
1.3.14Of the idea of necessary connexion5%
The Appendix’s 20th paragraph is the single most-cited paragraph in the whole Treatise. The aggressive search finds nearly twice as many citation points and keeps almost exactly the same order. For a reader, that’s a reading list. For a scholar, it means you can ask a different kind of question: who works on the same passages I do, and who leans on parts of the text that nobody else does?
One of the most surprising papers on the new measures shows what a single profile looks like against the field:
■ The field · 56 papers■ Robison 1974
§1.3.14 · Of the idea of necessary connexion · field 4.9% · Robison 10.3% · Robison leans here more than the field · includes 1.3.14.21, which no other paper cites
Each row is a section of Hume’s Treatise: on the left, the share of citations it gets, on average, across the 56 papers with enough citations to compare (10 or more); on the right, the share in Wade L. Robison’s “Hume on Personal Identity” (1974), one of the corpus’s most surprising papers. In 1.3.14 he cites paragraph 21, on necessary connexion as the foundation of causal inference, which no other paper cites. Bar lengths use a square-root scale.
The site
Literature as a wholeThe bar-chart map, plus a reading-list generator (“give me the top 15 paragraphs, strict search”).
Text locationsChoose a book, part, section or paragraph and see which publications cite it most.
Individual publicationsEvery paper ranked by how closely it matches the field, with its citations, a PhilPapers link and its nearest neighbours.
Project overviewA long methods page explaining the search, scoring and comparisons.
What I’d planned next
The next version would have let a scholar upload a draft and get back the published papers that lean on the same passages. After that, the plan was to repeat the whole process for other PhilPapers topics on Hume, and see which parts of the Treatise different topics share.
Development diary
Reconstructed from the git history, file dates and the running notes in the project’s notebooks. Dates before 27 May 2020 come from file dates, so they are approximate. The 2026 entries come from the rebuild’s own diary.
Building the corpus and the pipeline
October 2019 – mid-June 2020
Dev diary Oct 2019 – Feb 2020
Building the pile
The first files in the folder are PDFs. One arrived in late October 2019, a dozen more on 7 November, and most of the rest on 6 February 2020. Every one is named by its PhilPapers ID, so from the start the PhilPapers leaf on Hume on Personal Identity was the definition of “the literature.” The spreadsheet that ties each file to its record keeps a “Downloaded?” column with a mixture of “yes”, “YES” and “Yes”, which says something about how it was kept.
Dev diary 13 April 2020
A machine-readable Treatise
I made the three files the rest of the project stands on: the full Treatise text with every paragraph numbered, and a pair of concordance tables between Selby-Bigge page numbers and Norton paragraph numbers in each direction. Without them a citation like (T 252) is just a number.
Experiment log May 2020
From one file to a field
The oldest scripts took one paper, found its citations, and produced its distribution over the text. By 20 May there were plain-text versions of about a hundred papers and three notebooks working on what to do with them: one set up the comparison, papers as columns and paragraphs as rows; one settled how many neighbours to show (I can include 5 on either side as long as it’s within five percent); one added grades (90th percentile or better matches = A quality match). The initial commit came on 27 May 2020, with a refining-search branch opened within minutes. Everything after that happened there.
Method Late May – mid-June 2020
Making the search smarter
The longest notebook in the folder reads like a lab diary. The key design decision is written down early: get nortons. if fewer than 5 nortons, get sbns if fewer than 5 sbsn, get strict parens if fewer than 5 strict parens, get loose parens. That ladder became the strict search, and the loosest step became aggressive. Other notes record the tedious work: cleaning up newly acquired PDFs, fixing the parser so it read the § sign, and compiling chapters of Penelhum’s Themes from Hume as they came in from interlibrary loan. By mid-June each paper produced eight score sheets.
A website in two weeks
18 June – 2 July 2020
Dev diary 18–19 June 2020
Tidying up for a website
Six commits in one day, all housekeeping before building anything new. The scattered scripts became one package with a Paper class, text processing, scoring, literature-level operations and comparisons. Old scripts and CSVs moved aside. The next morning’s commit says comp functions completed.
Launch 20–27 June 2020
The website in a week
Flask basics on 20 June. Individual publications and the list of all papers on the 21st, each paper’s citations on the 22nd, and on the 23rd the reverse lookup: pick a paragraph and see who cites it. A landing page on the 24th. At 10 pm on 27 June: fully functional first version of website, with the Literature page, its two Tableau dashboards, a reading-list generator and the long methods page.
Launch 28 June – 2 July 2020
Into the cloud
Next the site had to stop reading files from my laptop. A project-management notebook writes out the whole pipeline as a checklist and then works through Google Cloud Storage and Firestore one step at a time, ending with: the only thing i’ll need to do now is to replace the local file functionality with cloud file functionality! The commits follow it closely, to the first working deploy on 1 July and a last fix on 2 July 2020.
Dev diary After July 2020
Where it stopped
The git history ends there. The methods page promised draft uploads and topics beyond personal identity; neither was built.
Bringing it back
October – November 2026
Dev diary 18 October 2026
The 2020 site, restored
The original site is back online at treatise-mapping-project-ur.outsidethevillage.com, looking as it did in 2020. The goal was a faithful archive to measure a modern version against, not an upgrade. The old cloud services had lapsed, so it now runs on Cloud Run in a Python 3.8 container pinned to the 2020 library versions, which was the only way to keep its behaviour exact. Firestore and Cloud Storage are gone: the data ships as plain files with the code, so there is no database to pay for or maintain.
One thing looks different. The Tableau Public charts on the Literature page were replaced with Chart.js and a title filter, so the page no longer depends on an outside service.
Experiment log 18 October 2026
What the old pipeline missed
With the archive running, I reviewed the 2020 pipeline for what a modern version should do differently. The biggest problem was extraction: 38 of the 100 processed papers registered no strict citations at all. The 2020 code stripped every space from the PDF text before searching, three PDFs were scans with no text layer, and many papers cite a bare page number like (261) after a quotation, which only the loose search caught.
The measures had a surprise too. The site’s “difference from the literature” score was a distance between percentage profiles, and it, TF-IDF and KL divergence all ranked off-topic papers (on justice, or substance) as the most novel. So the plan replaced it with two axes: how focused a paper is on the core personal identity passages, and how surprising its rarest citation is given how much the paper cites. The plan ran in four phases: rebuild extraction, compute the new measures, build a new site, then add a public upload tool.
Experiment log 18 October 2026
Telling Hume from his commentators
All 100 PDFs were converted again with docling, using OCR only for the three scans; the whole corpus took about ten minutes on a laptop. The new citation detector agreed with the 2020 strict counts for 83 papers, and building it caught two bugs of its own: a Norton cite followed by its SBN page was being counted twice, and Penelhum’s T 1. iv. 6. 261 style, which the 2020 code had read as a paragraph number, was being missed.
Most of the new citations sat in the uncertain tier, a bare page number right after a quotation. A model check sorted 200 of those candidates correctly about nine times in ten, and showed that most of them are not Hume at all but page cites to other scholars’ books. A cheaper check came from the Treatise itself: where the quoted words matched a passage, the page number could be tested directly, and on those 33 candidates the model agreed every time. Matching quotations first and asking a model only about what remained was cheap and far more accurate than the 2020 loose rule, which would have counted every one of those secondary-literature pages.
Re-scored, the corpus has 3,191 citations against 2,756 strict citations in 2020. Papers with no usable citations fell from 38 to 27, and papers with enough for comparisons (10 or more) rose from 46 to 56. Comparing against 2020 also caught Schwerin’s (Treatise 252) being read as “T” plus “reatise.” Every citation is now stored with its source (pattern, quote match or model), the words around it and the paragraphs it maps to, so every number on the new site traces back to a sentence in a paper.
Method 18 October 2026
Novelty as two axes, and four themes
Each paper now gets a focus score (its share of citations on the 15 most-cited paragraphs) and a surprise score (how unlikely its rarest precise citation was). Nine of 56 papers are both focused and surprising, among them Robison 1974 on necessary connexion and Ashley and Stack 1974 on modern philosophy. Turned around, 47 paragraphs are cited by at most three papers, at least one of them focused: the candidate “novel passages” the project set out to find.
Grouping papers on their whole profile first produced one giant cluster, because nearly everyone cites 1.4.6 and the Appendix. Setting those aside revealed four clear themes: the self and the passions, causation and the Appendix problem, body and the external world, and the immateriality of the soul. I reviewed them the same day and kept them as a first pass.
Launch 18 October 2026
A new site goes live
The modern site is live at treatise-mapping-project-new.outsidethevillage.com, alongside the archive. It maps all 1,375 paragraphs of the Treatise, shaded by how much the literature cites each one and filterable by theme or decade. Every paragraph has a page with Hume’s text and the sentence in each paper that cites it, and every paper has a page with its citation map, its focus and surprise, its theme mix and its five nearest neighbours. There are also pages to compare papers, browse the themes, and search the Treatise or jump to a passage by Norton or SBN number.
Astro generates about 1,500 plain HTML pages ahead of time, Observable Plot draws the charts and Pagefind handles search, so the whole site is a folder of files with nothing to break. Only derived data goes public: citation locations, scores, a short snippet around each citation and bibliographic records, with no paper text. Before calling it done I ran a security pass over the site and the cloud projects. The lesson: Defaults are where the exposure hides.
Experiment log 24 October 2026
Reading the empty ones by hand
Twenty-seven papers still showed no citations after the re-score, so each was read in full by hand, footnotes included. Twelve had real Treatise citations, mostly in footnotes, in forms like Treatise, p. 252 that nothing had been looking for. Those hand readings are now a fourth source beside pattern, quote match and model check, and the detector catches the footnote form too, with the model checking it. The corpus now has 3,308 citations, the papers with none fell from 27 to 17, and 59 papers have enough for comparisons. Two of the seventeen cite other editions (Penguin, and Green and Grose) whose pages can’t yet be mapped to Selby-Bigge, so they still show none.
Dev diary 24 October – 4 November 2026
The pipeline moves into the open
The pipeline that turns the PDFs into citation data moved from my private workspace into the public repo: the docling conversion, the detector, the quote and model checks, scoring and the measures, with tests. Paths come from environment variables, so no paper text enters the repo; the corpus stays private and only derived data is published. On 4 November the code got an MIT license, with the Treatise text credited to Hume Texts Online in the README.
Dev diary 28 October – 24 November 2026
The two versions, compared in writing
The repo now has a write-up comparing the 2020 and 2026 versions, both still online. It sets out what stayed the same, the PhilPapers leaf, the Hume Texts Online paragraphs, my 2020 concordance tables and the scoring rule, and what changed, starting with the plainest problem the review found: 38 of the 100 papers processed in 2020 registered no strict citations at all, partly because the code stripped every space from the text before searching. The pipeline’s paths now default to a local workspace, its tests run on a clean copy with the concordance tables as a fixture, and they run on every push. It all went onto main on 24 November.
Threads through the diary
The literature wasn’t mine to define.I used an expert-curated PhilPapers leaf instead of my own reading list, so the map reflects the field rather than my view of it.
Precision against recall, made visible.The site never chose between strict and aggressive search. It showed both, side by side, and explained the trade-off.
A philosopher’s problem first.The web stack took a week. The hard part was knowing how Hume scholars have cited the Treatise since the 1950s, well enough to write a parser for it.