v2: per-trial structured configs from Old Bailey Online XML 7.2 (trials / sessions / ordinarys_accounts + verbatim TEI)
Replaces the session-level default config with three configs parsed from the same OBO XML 7.2 (figshare 10.15131/shef.data.4775434.v2 / dhi.ac.uk zip):
trials(default) — 197,751 rows, one per<div1 type="trialAccount">: full text, typed persons (defendant/victim/witness/juror/judiciary/unspecified with gender, age, occupation, place), offences (9 categories / 57 subcategories, crime date, place, linked victims), verdicts and punishments with categories, and thecriminalChargejoins (defendant → offence → verdict); punishments resolved from part-1punishmentSummarydivs viadefendantPunishmentjoins.sessions— 2,163 rows, full session text (front matter etc. included) + typed persons.ordinarys_accounts— 475 rows.
Also: licence corrected to CC BY-NC 4.0 (the source's licence.txt; the 2022 script hard-coded CC BY 4.0), dataset_info dropped (schema changed), parser added under scripts/. Previous parquet stays at revision e96ea6d. Card rewrite to follow in a separate PR once the data is reviewed.
Known: 1 duplicate trial id in the source (s16980504-1, two supplementary items) suffixed -dup2; 58.7% of part-1 persons carry no role in the source (unspecified); text in trials covers 96.9% of session text (non-trial divs live in sessions).
Ready for review. Final state of this PR after two review rounds of the parser.
What's in it
trials(default) — 197,751 rows, one per<div1 type="trialAccount">:text, verbatim TEIxml, typedpersons(defendant / victim / witness / juror / judiciary;typeis null where the source records no role — 338,892 part-1 names) with given / surname / gender / age / occupation / place / aliases;offences(9 categories / 57 subcategories, crime date, place, linked victim ids);verdicts;punishments(category / subcategory,defendant_ids,found_in= the trial div holding the sentence text);charges(thecriminalChargejoins: defendant → offence → verdict, plusunresolved_idsfor targets that resolve to nothing);places;obo_url.sessions— 2,163 rows: full session text + filexml, typed persons,div_types, andsummary_items(offences / verdicts / punishments / aliases recorded insupplementaryMaterial/punishmentSummarydivs rather than trial accounts — the 1670s–80s style; 1,504 punishments, 5,049 such defendants).ordinarys_accounts— 475 rows, same person schema.scripts/parse_obo.py— the parser (lxml + polars), reproducible from the figshare zip.- Licence corrected to CC BY-NC 4.0 (source
licence.txt; the 2022 loading script hard-coded CC BY 4.0).dataset_infodropped (schema changed). Previous session-level parquet remains at revisione96ea6d.
Verification
- Two independent code reviews of the parser (12 + 10 findings; all bugs fixed, the rest confirmed ok with evidence).
- Invariants check of 3,094 trial divs against the raw XML: every person id / interp, offence & verdict id and category, charge partition, punishment link and in-div punishment matches.
- All three configs read from this branch with DuckDB (
hf://datasets/biglam/old_bailey_proceedings@refs%2Fpr%2F4/<config>/train-*.parquet).
Source quirks preserved, not hidden (to be documented in the card)
- 916 verdict ids and 90 offence ids are reused within a trial div in the source →
charges.verdict_ids/offence_idsare ambiguous there. - 298 persons carry two
ageinterps (first kept); 414<persName>elements are empty (name null). - 3 sessions have no trial divs (
16811124,16830524A= front matter/summary only;16781211has 74k chars of text and no markup at all) — present insessionsonly. - 1 duplicate trial id in the source (
s16980504-1→ second copys16980504-1-dup2); 106 punishments with no join; 514 punishments whose text sits in a different trial div than their defendant (found_in). - Sparse-by-source: occupation 7.6% of persons, person place 1.3%, offence place 28%, crime date 56%, age 13% of persons (58% of defendants).
Not in this PR
- Card rewrite (curator voice, DHI attribution statement, sparsity table, changelog crediting the 2022 sprint) — follow-up PR.
- Note: the Hub viewer only renders
main, so schema/xml-cell rendering can only be eyeballed after merge.