# Contributing to CatholicCorpus CatholicCorpus welcomes contributions from researchers, developers, and anyone interested in making Catholic texts more accessible to computational scholarship. This document explains how to participate. ## What we accept CatholicCorpus is a textual archive, not a magisterium. We do not edit theology; we correct OCR, provenance, and metadata. Contributions should improve the accuracy, coverage, or usability of the corpus without altering the theological content of source texts. ## Flagging OCR Errors Many texts in the corpus (especially PDFs from archive.org) were digitized via OCR and contain recognition errors. To report OCR problems: 1. Open a GitHub issue with the title `OCR: [filename or collection]`. 2. Include the file path, page number (if PDF), and the erroneous text. 3. If you have a corrected version, include it in the issue or submit a pull request. We prioritize corrections to high-use texts (Church Fathers, Aquinas, Council documents) over obscure material. ## Proposing a New Collection To propose adding a new source to the corpus: 1. Open a GitHub issue with the title `Proposal: [collection name]`. 2. Include: - What the collection contains and its scholarly significance. - Where the source material is hosted (URL). - The license status (public domain, Creative Commons, or copyrighted). - Approximate size (number of texts, estimated word count). 3. Collections must be either public domain or openly licensed. We do not include copyrighted material without explicit permission (see Task 17 as the model for script-only inclusion). ## Submitting a Corrected Text If you have a higher-quality version of a text already in the corpus (for example, a critical edition that has entered the public domain, or a corrected OCR transcription): 1. Fork the repository and place the corrected file in the appropriate task folder. 2. Create or update the `_source.json` sidecar to document the new source, including attribution. 3. Submit a pull request with a clear description of what was changed and why. ## GitHub Workflow 1. Fork the repository. 2. Create a branch named `fix/description` or `add/description`. 3. Make your changes. Ensure every new content file has a `_source.json` sidecar. 4. Run `python3 build_manifest.py` to update the manifest. 5. Submit a pull request against `main`. Pull requests are reviewed for: provenance accuracy, license compliance, and metadata completeness. We do not review theological content for doctrinal correctness (that is not the purpose of this project). ## Editorial Policy - **We correct**: OCR errors, incorrect metadata, broken source URLs, missing attribution, file format issues. - **We do not correct**: Theological content, translation choices, editorial decisions made by the original publishers. If a 19th-century editor made a questionable textual decision, that is a fact about the corpus, not a bug. - **We document rather than hide**: If a text has known problems (poor OCR, disputed attribution, incomplete transcription), we document that in the sidecar or in LIMITATIONS.md rather than removing the text. ## Planned Work That Welcomes Help The following items from the [ROADMAP](ROADMAP.md) would benefit from community contributions: - **Deduplication analysis**: Identifying duplicate passages across collections (Vulgate fragments in Aquinas, repeated lectionary readings, doublets across Patrologia Latina volumes). Methodology: minhash with Jaccard similarity at paragraph level. - **OCR quality scoring**: Automated assessment of text extraction quality per document (character confidence scores, empty-page ratios, garbled-text detection). - **Text extraction improvements**: Edge-case handling in `text_extraction/extract_text.py`, especially for complex PDF layouts and mixed-language pages. - **Quickstart RAG notebook**: A Jupyter notebook demonstrating retrieval-augmented generation using the corpus as a knowledge base. - **Language detection**: Automated per-file language tagging (many files are multilingual, mixing Latin with Greek or English commentary). - **Sentence alignment**: For texts that exist in both Latin and English, producing parallel aligned versions suitable for translation research. If you want to work on any of these, open an issue first to coordinate and avoid duplicate effort. ## Code of Conduct Be collegial. This project sits at the intersection of computer science, theology, and classical philology. Contributors may come from any of these backgrounds. Assume good faith, explain domain-specific terminology, and remember that the goal is making texts accessible, not winning arguments about their interpretation. ## Questions For questions about contributing, write to admin@catholiccorpus.org or open a discussion on GitHub.