The Digital Dhammapada: A Stoic-Buddhist Comparative Edition
This repository contains a computationally enriched, comparative edition of the Dhammapada, a foundational text of the Buddhist Khuddaka Nikaya. The project utilizes a specialized “Conceptual Anchoring” framework to bridge the gap between Early Buddhist Pali source material and the technical philosophical lexicon of Ancient Stoicism.
The dataset is provided in a cleaned, machine-readable JSON format, specifically structured for thematic lexical analysis, cross-tradition semantic mapping, or the development of comparative philosophical readers.
Source Path: bilara-data/root/pli/ms/sutta/kn/dhp.
Format: The raw segments were reassembled into 423 discrete verses, ensuring the integrity of the original canonical structure before processing.
Stage 1: Translation (translate_dhp.py)
Each verse was translated into English using the Gemma-3-4B-IT model.
Conceptual Anchoring: The model was prompted as a philologist expert in Early Buddhist Texts.
Lexical Constraints: Specific Pali terms were anchored to prevent hallucinations (e.g., mapping Mano to ‘Mind’ and Dhamma to ‘mental states’).
Atomization: The output was structured as a JSON list of “Wisdom Atoms” (sentences) to facilitate future semantic similarity analysis.
Stage 2: Stoic Annotation (annotate_dhp_stoic_commentary.py)
The translated verses were passed through the Gemma-3-12B-IT model to produce a comparative “Stoic Commentary”.
Stoic Lexicon: The model utilized a reference palette of 19 technical terms (e.g., hegemonikon, proairesis, phantasia) to interpret Buddhist psychological states.
Philological Restraint: The commentary was generated with instructions to maintain “the brevity of Marcus Aurelius,” ensuring that Stoic terminology was only applied where a high-fidelity mapping to the Pali logic existed.
Stage 3: Refinement & Pruning (cleanup_dhp_commentary.py)
A final post-processing pass was employed to “prune” the technical density of the commentary.
Brevity: The model reduced word counts and limited technical terms to the 1 or 2 most essential concepts per verse.
Artifact Removal: Automated scrubbing removed Markdown artifacts (such as asterisks used for italics) to ensure clean rendering in the web reader.
dhp_with_stoic_commentary.json: The complete Dhammapada (423 verses) featuring the original Pali text, anchored English translation, and comparative Stoic commentary.
Dhammapada_Reader.html: A standalone browser-based interface for interactive study.
Primary Use Cases
Cross-Cultural Philosophy: Quantitative research into the intersection of Stoic apatheia and Buddhist nirvana through shared semantic structures.
Digital Humanities: Thematic analysis of how technical Greek philosophical terms can model non-Western psychological frameworks.
Comparative Pedagogy: Interactive educational tools for exploring the “Symmetry of Wisdom” across distinct historical contexts.
Layout: A three-pane view displaying the Pali Verse, the English Translation, and the Stoic Commentary.
Dynamic Highlighting: Stoic technical terms are automatically identified and italicized for easy reference.
Ensure dhp_with_stoic_commentary.json is in the root directory.
Run a local server: python3 -m http.server 8000.
Navigate to: http://localhost:8000/Dhammapada_Reader.html.
License: Creative Commons Attribution 4.0 International (CC BY 4.0).