catholiccorpus / README.md
ddbaula's picture
Update README.md
cf8987c verified
---
language:
- la
- grc
- en
license:
- other
license_name: mixed-public-domain-cc
tags:
- catholic
- theology
- patristics
- scholasticism
- latin
- greek
- church-fathers
- nlp
- digital-humanities
- corpus
- religion
pretty_name: CatholicCorpus
size_categories:
- 10K<n<100K
task_categories:
- text-generation
- text-classification
- feature-extraction
configs:
- config_name: default
data_files: "**/*"
---
# CatholicCorpus
An open-access, NLP-ready corpus of Catholic texts spanning 2,000 years of the Catholic intellectual tradition — from the Church Fathers to the 20th century.
**67,772 content files | 16 collections | 35.9 GB | 2,000 years of coverage**
## What's In the Corpus
| # | Collection | Content Files | Size | Format |
|---|-----------|-----:|-----:|--------|
| 01 | Git Repos (CSEL, Aquinas Opera Omnia, Septuagint, Byzantine Text, eBible) | 4,668 | 3.4 GB | TEI XML, TXT |
| 02 | Corpus Corporum (Patrologia Latina + 29 Latin/Greek corpora from mlat.uzh.ch) | 29,820 | 4.2 GB | TEI XML |
| 03 | Gutenberg (Douay-Rheims, Imitation of Christ, Baltimore Catechism, etc.) | 18 | 9 MB | TXT |
| 04 | Direct Downloads (Clementine Vulgate, SBLGNT, Canon Law 1917, Roman Catechism) | 1,244 | 42 MB | TXT, PDF |
| 05 | CCEL (Ante-Nicene/Nicene Fathers, Summa Theologiae, devotional classics) | 61 | 691 MB | PDF |
| 06 | Catholic Encyclopedia (complete 1913 edition, 15 volumes) | 18 | 1.0 GB | PDF |
| 07 | Latin & Franciscan (Anselm, Peter Lombard, Bonaventure, Scotus, Ockham) | 30 | 1.1 GB | PDF |
| 08 | Liturgical & Hymns (Divine Office, hymns, pre-1928 papal encyclicals) | 31,141 | 202 MB | HTML, GABC |
| 09 | Archive & Misc (Council of Trent, Golden Legend, Butler's Lives, Albert the Great) | 65 | 2.1 GB | PDF |
| 11 | Catholic Bible (Douay-Rheims, Haydock annotated Bible, Lapide Commentary) | 12 | 673 MB | PDF |
| 12 | English Catholic Thinkers (Newman 33 vols, Chesterton 7, Belloc 5) | 45 | 841 MB | PDF |
| 13 | Mystics (Therese, Julian of Norwich, Catherine of Siena, Ignatius, etc.) | 13 | 182 MB | PDF |
| 14 | Liturgical Expansion (Liber Usualis, Missale Romanum, Rituale, Breviarium) | 16 | 2.2 GB | PDF |
| 15 | Late Scholastics (Suarez 27 vols, Bellarmine, Cajetan, a Lapide, Banez, Molina) | 42 | 3.9 GB | PDF |
| 16 | Patrologia Graeca (159 of 161 Migne PG volumes with OCR text and EPUB) | 471 | 15.5 GB | PDF, TXT, EPUB |
Task 17 (Modern Magisterium) contains a download script for post-1928 Vatican documents. The **script is MIT-licensed**, but the downloaded content is under copyright and is **not included** in the redistributable corpus.
### Text Extraction
The `text_extraction/` folder contains a ready-to-run pipeline that processes all content files from Tasks 01–17 (PDF, EPUB, HTML, XML) into unified plain `.txt` format.
Pre-extracted plain text (47,407 files, 5.7 GB, 2.64B GPT-2 tokens) is available at [`CatholicCorpus/catholiccorpus-text`](https://huggingface.co/datasets/CatholicCorpus/catholiccorpus-text).
To run it yourself:
```bash
cd text_extraction
pip install pdfplumber lxml beautifulsoup4 ebooklib
caffeinate -i python3 extract_text.py
```
## Provenance
Every downloaded file has a companion `_source.json` sidecar documenting its source URL, license, and download date.
## Getting Started
### Browse the Corpus
Each collection folder contains texts organized by author or collection, with `_source.json` sidecars for provenance.
### Re-download Everything
Each task folder has an idempotent `download_script.py`:
```bash
pip install requests lxml
cd 13_mystics && python download_script.py
```
Scripts skip already-downloaded files and resume cleanly after interruption.
To re-download the entire corpus:
```bash
pip install requests lxml
bash run_all.sh
```
Task 02 (Corpus Corporum) is the longest — expect 12–24 hours for the full Patrologia Latina.
### Rebuild the Manifest
```bash
python build_manifest.py
```
Regenerates `master_manifest.json` (machine-readable) and `SUMMARY.md` (human-readable) from disk state.
## Licensing
The vast majority of this corpus is **public domain** (pre-1928 U.S. publications or authors deceased 70+ years). Two items carry Creative Commons licenses:
- **SBLGNT**: CC BY 4.0 (Society of Biblical Literature)
- **Rahlfs Septuagint 1935**: CC BY-NC-SA 4.0 (Eliran Wong)
See [LICENSE_NOTES.md](LICENSE_NOTES.md) for the full breakdown, and check each file's `_source.json` sidecar for per-item license details.
## Attribution
If you use this corpus in research, please cite:
> CatholicCorpus — An open-access corpus of Catholic texts for NLP and digital humanities research. https://catholiccorpus.org
See [ACKNOWLEDGMENTS.md](ACKNOWLEDGMENTS.md) for the full list of institutions, projects, and individuals whose work made this possible.
## Project Structure
```
CatholicCorpus/
01_git_repos/ — Git-cloned text repositories
02_corpus_corporum/ — Corpus Corporum Latin texts (TEI XML)
03_gutenberg/ — Project Gutenberg texts
...
16_patrologia_graeca/ — Migne PG volumes
17_modern_magisterium/ — Download script only (content is copyrighted)
text_extraction/ — Plain text extraction pipeline (code only, not yet run)
stats/ — Tokenization and composition scripts
docs/ — Schema documentation
archive_helpers.py — Shared archive.org download utilities
build_manifest.py — Manifest + summary generator
master_manifest.json — Full file inventory (machine-readable)
dataset.json — Machine-readable dataset metadata
SUMMARY.md — Current corpus statistics
LICENSE_NOTES.md — Licensing details
LIMITATIONS.md — Known limitations, biases, and scope
ROADMAP.md — Versioned release milestones
CHANGELOG.md — Version history
CONTRIBUTING.md — How to contribute
ACKNOWLEDGMENTS.md — Credits and attribution
BACKLOG.md — Known gaps and future work
LENDING_RESTRICTED.md — Archive.org borrow-only items
```
## Limitations
See [LIMITATIONS.md](LIMITATIONS.md) for the full discussion of scope, biases, and known gaps. Key items:
- **Patrologia Graeca vols 16 & 86**: Not found on archive.org (98.8% coverage without them).
- **23 archive.org items** are lending-restricted (borrow-only). See [LENDING_RESTRICTED.md](LENDING_RESTRICTED.md).
- **Text extraction** not yet run (code included for review).
- **Token counts cover text-extractable files only** (2.6B tokens counted; PDF-only collections pending text extraction).
- **OCR quality varies** by collection; no systematic scoring performed yet.
## Requirements
- Python 3.8+
- `requests` and `lxml` (`pip install requests lxml`)
- ~40 GB free disk space for the full corpus
- Patience for archive.org rate limits
## License
The **download scripts** in this repository are released under the [MIT License](https://opensource.org/licenses/MIT). The **downloaded content** is subject to the individual licenses documented in each file's `_source.json` sidecar and in [LICENSE_NOTES.md](LICENSE_NOTES.md).