Skip to content

aegean.greek.bible

bible

Biblical & Koine Greek specialist toolkit (aegean.greek.bible).

Provides an integrated, scholarly workflow for Koine and Biblical Greek across five pillars — zero extra dependencies, lazy-loaded so import aegean pays no startup cost, and usable offline with seamless upgrades to SHA-256-pinned fetch-on-demand release assets:

  1. Multi-edition Greek New Testament (:func:load_nt, :func:compare_editions, :func:nt_editions, :func:nt_books): all 9 editions — Nestle 1904 (gold lemma, Robinson morphology, Strong's, UD UPOS; John 1 & Philemon 1 bundled offline), SBLGNT, Statistical Restoration GNT, Bunning Heuristic Prototype, Tischendorf 8th, Westcott–Hort, Robinson–Pierpont Byzantine Majority Text, Antoniades Patriarchal Text, and Textus Receptus, with word-level textual variant diffing.
  2. Early Greek NT Manuscript Witnesses (:func:witnesses, :func:load_witness, :func:compare_witnesses, :func:parse_mes, :func:expand_nomen_sacrum): 13 landmark 2nd–5th c. CE uncials and papyri (Sinaiticus 01/ℵ, Alexandrinus 02/A, Vaticanus 03/B, Ephraemi 04/C, Bezae 05/D, Washingtonianus 032/W, P45, P46, P47, P52, P66, P72, P75) with CNTR MES diplomatic markup and nomina sacra expansion.
  3. Strong's & Extended Strong's Greek Lexicon (:func:strongs_entry, :func:strongs_roots, :func:search_strongs, :func:use_strongs): works immediately offline via bundled Dodson (CC0) and upgrades to 11,142 entries covering NT + LXX + Apocrypha + Apostolic Fathers with etymological root trees and Hebrew equivalents.
  4. Septuagint (LXX) & Psalm Numbering (:func:lxx_books, :func:load_lxx, :func:psalm_lxx_to_mt, :func:psalm_mt_to_lxx): friendly book-name access to all 56 Septuagint books (Swete + Ecclesiastes) plus exact LXX ↔ Masoretic Psalm numbering conversion.
  5. Greek Patristic Commentaries & Word Studies (:func:patristic_commentaries, :func:load_commentary, :func:word_study, :func:search_bible): friendly book-name access to all 30 Greek NT Catenae volumes and 18 Origen biblical commentaries, plus unified word-study reports and concordance search.

CommentaryWork dataclass

CommentaryWork(work_id: str, book: str, author: str, title: str, kind: str, books: tuple[str, ...] = (), source: str = 'first1k')

Metadata for one Greek patristic biblical commentary (First1KGreek or Patrologia Graeca).

LxxBook dataclass

LxxBook(name: str, title: str, work_id: str, section: str, aliases: tuple[str, ...])

Metadata for one Septuagint (LXX) book in the First1KGreek catalogue.

EditionComparison dataclass

EditionComparison(book: str, ref: str, editions: tuple[str, ...], verses: tuple[VerseComparison, ...])

Multi-edition comparison for a passage (one or more verses).

VerseComparison dataclass

VerseComparison(ref: str, texts: dict[str, str], identical: bool, variants: tuple[WordVariant, ...])

Side-by-side comparison of one Greek NT verse across multiple editions.

WordVariant dataclass

WordVariant(edition: str, kind: str, base_words: tuple[str, ...], edition_words: tuple[str, ...])

One word-level textual difference between a baseline edition and another edition.

CommentaryExcerpt dataclass

CommentaryExcerpt(work_id: str, book: str, author: str, title: str, kind: str, section_id: str, text: str, matched_words: tuple[str, ...] = ())

One Greek patristic commentary section or search match (Catenae or Origen).

LxxHit dataclass

LxxHit(ref: str, book: str, title: str, section: str, verse_text: str, matched_words: tuple[str, ...])

One Septuagint (LXX) concordance search match.

WitnessReading dataclass

WitnessReading(diplomatic: str, readable: str, nomina_sacra: tuple[tuple[str, str], ...], corrections: tuple[tuple[str, str], ...], has_lacuna: bool)

Parsed early-manuscript reading for one verse.

StrongsEntry dataclass

StrongsEntry(strongs: str, lemma: str, gloss: str, definition: str, translit: str = '', morph: str = '', strongs_def: str = '', kjv_def: str = '', derivation: str = '', roots: tuple[str, ...] = (), hebrew: tuple[str, ...] = (), variants: tuple[str, ...] = (), source: str = 'dodson')

One Strong's or Extended Strong's Greek lexicon entry.

ConcordanceHit dataclass

ConcordanceHit(ref: str, book: str, surface: str, lemma: str, morph: str, strongs: str, gloss: str, verse_text: str)

One verse-level concordance match in the Greek New Testament or Septuagint.

WordStudy dataclass

WordStudy(query: str, lemma: str, strongs: str, entry: StrongsEntry | None, roots: dict[str, Any] | None, lexicon_entries: dict[str, str], scope: str, total_occurrences: int, by_book: dict[str, int], by_morph: dict[str, int], by_surface: dict[str, int], occurrences: tuple[ConcordanceHit, ...], lxx_total: int = 0, lxx_scope: str = '', lxx_by_book: dict[str, int] = dict(), lxx_occurrences: tuple[LxxHit, ...] = ())

Complete Koine / Biblical Greek word study report (NT + optional LXX).

WitnessVerseComparison dataclass

WitnessVerseComparison(ref: str, witnesses: tuple[WitnessVerseEntry, ...])

All extant early manuscript witnesses attesting one verse.

WitnessVerseEntry dataclass

WitnessVerseEntry(siglum: str, alias: str, name: str, century: str, reading: WitnessReading)

One early manuscript's attestation for a verse.

nt_books

nt_books() -> list[dict[str, Any]]

The 27 books of the Greek New Testament, in canonical order.

Each entry is {'name': 'John', 'aliases': ['john', 'jn', 'jhn']}. Any of the name or its aliases is accepted as the book argument to :func:load_nt; the name is what appears in document ids (e.g. 'John 1'). Pure metadata — no download — so it works offline and is the answer to "which books can I load?".

convert_psalm

convert_psalm(psalm: int, *, system: str = 'mt') -> dict[str, Any]

Convert a Psalm number between Masoretic ('mt') and Septuagint ('lxx') numbering.

Returns a dictionary containing mt, lxx, note, and lxx_work_id.

lxx_books

lxx_books(*, section: str | None = None) -> list[dict[str, Any]]

List all 56 Septuagint (LXX) books (55 Swete + Ecclesiastes).

Optionally filter by section ('Pentateuch', 'History', 'Wisdom', 'Minor Prophets', 'Major Prophets', or 'Deuterocanonical'). Offline metadata — requires no download.

patristic_commentaries

patristic_commentaries(book: str | None = None, *, kind: str | None = None) -> list[dict[str, Any]]

List Greek patristic biblical commentaries across First1KGreek, Patrologia Graeca, and the John Chrysostom corpus.

Covers 112 commentary volumes across 11 Church Fathers and traditions: all 30 Greek NT Catenae volumes (tlg4102.*), 41 Origen biblical commentaries, homilies, scholia, selecta, and adnotationes (tlg2042.*), 6 additional First1KGreek Fathers (Cyril of Alexandria, Methodius, Eusebius, Clement of Alexandria, Vitae Prophetarum), 9 Patrologia Graeca commentary volumes (Cyril of Alexandria, Procopius of Gaza, Photius, Oecumenius, and Theophylact of Bulgaria), and 26 John Chrysostom homily and commentary series (ogc*, Genesis through Hebrews). Filter by book (e.g. 'John', 'Matt', 'Rom', 'Gen', 'Hos') and/or kind ('catena', 'origen', 'patristic', 'patrologia', or 'chrysostom'). Pure metadata — works offline.

psalm_lxx_to_mt

psalm_lxx_to_mt(psalm: int) -> tuple[int, ...]

Convert a Septuagint (LXX) Psalm number (1–151) to Masoretic / English Psalm number(s).

Returns a tuple of corresponding MT Psalm numbers: - psalm_lxx_to_mt(9) -> (9, 10) (LXX combines MT 9 and 10) - psalm_lxx_to_mt(22) -> (23,) (The Lord is my shepherd) - psalm_lxx_to_mt(113) -> (114, 115) - psalm_lxx_to_mt(114) -> (116,) (LXX splits MT 116 into 114–115) - psalm_lxx_to_mt(151) -> () (LXX-only extra-canonical Psalm 151)

psalm_mt_to_lxx

psalm_mt_to_lxx(psalm: int) -> tuple[int, ...]

Convert a Masoretic / English Psalm number (1–150) to Septuagint (LXX) Psalm number(s).

Returns a tuple of corresponding LXX Psalm numbers: - psalm_mt_to_lxx(23) -> (22,) - psalm_mt_to_lxx(10) -> (9,) - psalm_mt_to_lxx(116) -> (114, 115) - psalm_mt_to_lxx(147) -> (146, 147)

resolve_edition

resolve_edition(edition: str) -> str

Resolve an edition name or alias to its canonical id.

resolve_lxx_book

resolve_lxx_book(book: str) -> LxxBook

Resolve a friendly LXX book name, abbreviation, or TLG work ID.

resolve_witness

resolve_witness(siglum: str) -> str

Resolve a Gregory–Aland siglum, symbol (ℵ, B, 𝔓52), or codex name.

compare_editions

compare_editions(book: str, ref: str, *, editions: Sequence[str] | None = None, offline: bool = False) -> EditionComparison

Compare a Greek NT passage side-by-side across editions with word-level variant diffs.

By default compares five core editions (nestle1904, sblgnt, srgnt, byz, tr); pass editions= to compare any subset of all nine supported editions (including bhp, tisch, wh, antoniades). Pure punctuation and orthographic/accent differences are ignored when computing variants so genuine textual variants (such as John 1:18 μονογενὴς θεός vs. ὁ μονογενὴς υἱός) stand out.

load_nt

load_nt(book: str | None = None, ref: str | None = None, *, edition: str = 'nestle1904', offline: bool = False, force: bool = False) -> Any

Load the Greek New Testament in any of the 9 supported editions.

edition accepts 'nestle1904' (default, full gold lemma/morph/Strong's, offline sample John 1 & Philemon 1), 'sblgnt', 'srgnt', 'bhp', 'tisch', 'wh', 'byz', 'antoniades', or 'tr'. Returns a standard :class:aegean.Corpus with one :class:aegean.Document per chapter and verse-aligned lines.

nt_editions

nt_editions() -> list[dict[str, Any]]

List the nine supported Greek New Testament editions and their licenses.

commentary_excerpt

commentary_excerpt(book: str, *, work_id: str | None = None, kind: str | None = None, ref: str | None = None, query: str | None = None, limit: int = 5, force: bool = False) -> list[CommentaryExcerpt]

Read or search Greek patristic commentary sections (Catenae, Origen, John Chrysostom, First1KGreek Fathers, or Patrologia Graeca) for a book.

Loads First1KGreek volumes via :func:aegean.greek.load_work, John Chrysostom commentary/homily series (ogc*) via :func:aegean.greek.load_collection_work, and Patrologia Graeca volumes (PG*) via :func:aegean.scripts.greek.load_patrologia, returning structured :class:CommentaryExcerpt records optionally filtered by Greek query (accent/case-insensitive).

enrich_lxx_interlinear

enrich_lxx_interlinear(corpus: Any, *, allow_fetch: bool = False) -> Any

Attach automatic lemma, POS, Strong's ID, and gloss to LXX tokens in place.

Clearly tags each enriched token with annotation_source="auto-lexicon" so automatic lexicon lookup is always distinguished from gold treebank/Nestle 1904 annotations. Uses Extended Strong's (fetched once when allow_fetch=True and not yet cached, providing curated STEPBible morphology across 11,142 Greek entries) and falls back cleanly to the bundled offline Dodson lexicon + offline lemmatizer/POS rules when offline.

load_lxx

load_lxx(book: str | None = None, ref: str | None = None, *, numbering: str = 'lxx', interlinear: bool = False, offline: bool = False, force: bool = False) -> Any

Load a Septuagint (LXX) book or passage as a :class:~aegean.core.corpus.Corpus.

Uses the SHA-256-pinned lxx-corpus bundle (all 56 Greek Septuagint books including Ecclesiastes, 29,470 verses) when cached or offline=False. When offline=True and the full bundle is not yet cached, serves from the bundled Swete 1887 offline sample (Genesis 1:1–5 and LXX Psalm 22:1–6 [MT 23]).

Accepts inline references (load_lxx("Gen 1:1-5") or load_lxx("MT Ps 23")), Masoretic Psalm numbering (numbering="mt"), and automatic offline interlinear glossing (interlinear=True, tagged annotation_source="auto-lexicon").

lxx_loaded

lxx_loaded() -> bool

Return True if the full 56-book lxx-corpus bundle is cached locally.

search_lxx

search_lxx(query: str, *, book: str | None = None, section: str | None = None, limit: int = 25, offline: bool = False) -> list[LxxHit]

Search the Greek Septuagint (LXX) by Greek word, folded stem, or phrase.

Searches all 56 Greek Septuagint books when lxx-corpus is cached or offline=False, or searches the bundled Swete 1887 sample (Genesis 1:1–5 and LXX Psalm 22:1–6) when offline=True and the full bundle is not cached. limit <= 0 returns all matches.

expand_nomen_sacrum

expand_nomen_sacrum(token: str) -> str | None

Expand a single CNTR nomen sacrum token (with or without leading =).

expand_nomina_sacra

expand_nomina_sacra(text: str) -> tuple[str, list[str]]

Expand nomina sacra contractions across a Greek manuscript phrase or verse.

Handles both CNTR =-prefixed tokens (=θσ) and plain unaccented/lunate contractions (θς, θν, ις, χς, κυ, πνα). Returns (expanded_text, notes) where each note records "<abbrev> → <expanded>".

parse_mes

parse_mes(raw: str, *, hand: str = 'original', expand_nomina_sacra: bool = True, include_supplied: bool = True) -> WitnessReading

Parse a CNTR MES diplomatic verse string into a structured :class:WitnessReading.

Parameters

raw: The raw CNTR MES string for a verse. hand: 'original' (default, first hand x{...}) or 'corrected' (later corrector {...} / a{...} / b{...}). expand_nomina_sacra: When True (default), expands nomina sacra (=ιυ → Ἰησοῦ). include_supplied: When True (default), retains editorially supplied lacuna words (~word / +word); when False, marks them as […].

normalize_strongs_id

normalize_strongs_id(query: str | int) -> str | None

Normalize 3056, 'G3056', 'g0026', or 'G0001G' to canonical 'G3056' / 'G0001G'.

Returns None if query is not a Strong's number (e.g. a Greek lemma).

search_strongs

search_strongs(query: str, *, limit: int = 20, allow_fetch: bool = False) -> list[StrongsEntry]

Search Strong's Greek entries by Greek lemma, transliteration, Strong's ID, or English gloss.

strongs_entry

strongs_entry(query: str | int, *, allow_fetch: bool = False) -> StrongsEntry | None

Look up a Strong's Greek entry by number ('G3056', 3056) or Greek word ('λόγος').

Uses the full Extended Strong's lexicon (STEPBible TBESG + OpenScriptures, covering NT + LXX + Apocrypha + Apostolic Fathers with root derivations) when cached or when allow_fetch=True; otherwise falls back cleanly to the bundled offline Dodson NT lexicon (CC0).

strongs_loaded

strongs_loaded() -> bool

Return True if the Extended Strong's lexicon is loaded or cached locally.

strongs_roots

strongs_roots(query: str | int, *, max_depth: int = 4, allow_fetch: bool = False) -> dict[str, Any]

Build the recursive etymological root family tree for a Strong's entry.

Requires the strongs-greek lexicon for derivation chains (falls back to a single-node tree when only offline Dodson is available).

use_strongs

use_strongs(*, fetch: bool = True, force: bool = False) -> int

Activate the full 11,142-entry Extended Strong's Greek Lexicon.

Fetches strongs-greek (~1.5 MB gzip, CC BY-SA 4.0) to the local data store on first use when fetch=True. Returns the number of loaded entries.

load_commentary

load_commentary(book: str, *, work_id: str | None = None, kind: str | None = None, ref: str | None = None, force: bool = False) -> Any

Load a Greek patristic biblical commentary (Catenae, Origen, John Chrysostom, First1KGreek Fathers, or Patrologia Graeca) by book name or explicit work_id.

For example, load_commentary('John') loads the Catena Integra in Joannem (tlg4102.tlg005), load_commentary('John', kind='chrysostom') loads John Chrysostom's Homilies on John (ogc002058), load_commentary('John', kind='origen') loads Origen's Commentarii in Evangelium Joannis (tlg2042.tlg005), and load_commentary('John', kind='patrologia') loads Cyril of Alexandria's Commentary on John (PG073). Pass work_id explicitly to pick any volume from :func:patristic_commentaries.

search_bible

search_bible(query: str, *, by: str = 'lemma', book: str | None = None, edition: str = 'nestle1904', corpus: str = 'auto', limit: int = 50, offline: bool = False) -> list[ConcordanceHit]

Search the Greek New Testament and/or Septuagint (LXX) by lemma, surface text, Strong's number, morphology, or gloss.

Works immediately offline on the bundled Nestle 1904 sample (John 1 & Philemon 1) and Swete LXX sample (Gen 1 & Ps 22) and automatically spans all 27 NT books and 56 LXX books once cached.

Parameters

query: Search value (e.g. 'λόγος', 'G3056', 'V-AAI', 'light'). by: One of 'lemma' (default), 'text', 'strongs', 'morph', or 'gloss'. book: Optional NT or LXX book filter (e.g. 'John', 'Rom', 'Gen', 'Eccl'). When corpus='auto', passing an LXX book automatically searches the Septuagint. edition: NT edition (default 'nestle1904'; non-annotated editions support by='text'). corpus: 'auto' (default: NT unless book is an LXX book), 'nt', 'lxx', or 'both' (searches both NT and LXX). limit: Maximum hits to return (default 50; 0 returns all matches).

word_study

word_study(query: str | int, *, book: str | None = None, include_lxx: bool | None = None, limit: int = 20, offline: bool = False) -> WordStudy

Run a unified Biblical & Koine Greek word study for a Strong's ID or Greek word.

Combines: - Strong's / Extended Strong's entry (gloss, definition, Hebrew equivalents, KJV usage) and recursive etymological root tree; - Entries from any active classical/Koine registry lexica (e.g. Abbott-Smith, LSJ, Middle Liddell); - Greek NT occurrence counts, book distribution, Robinson morphology breakdown, inflected surface-form breakdown, and verse concordance; - Septuagint (LXX) occurrence counts, book distribution, and sample verses (automatically included when book is unset or an LXX book, or when include_lxx=True).

compare_witnesses

compare_witnesses(book: str, ref: str, *, sigla: Sequence[str] | None = None, hand: str = 'original', expand_nomina_sacra: bool = True, include_supplied: bool = True, offline: bool = False) -> list[WitnessVerseComparison]

Compare extant early Greek NT manuscripts verse-by-verse for a passage.

For example, compare_witnesses('John', '1.18') shows P66, P75, 01 (Sinaiticus), 02 (Alexandrinus), 03 (Vaticanus), 04 (Ephraemi), and 032 (Washingtonianus) side by side, preserving both diplomatic MES markup and expanded readable readings.

load_witness

load_witness(siglum: str, book: str | None = None, ref: str | None = None, *, hand: str = 'original', expand_nomina_sacra: bool = True, include_supplied: bool = True, offline: bool = False) -> Any

Load an early Greek NT manuscript witness as a :class:aegean.Corpus.

Accepts Gregory–Aland sigla ('01', '03', 'P52', 'P66'), traditional symbols ('ℵ', 'B', 'A', 'D'), or names ('Sinaiticus', 'Vaticanus', 'Rylands'). Each token carries ref, witness, and diplomatic_verse annotations.

witnesses

witnesses() -> list[dict[str, Any]]

List the 13 early Greek New Testament manuscript witnesses (offline metadata).