Skip to content

pyaegean

A specialist Python toolkit for Ancient Greek and the Aegean syllabic scripts: alphabetic Greek (Archaic through Koine) and Linear A, Linear B, the Cypriot syllabary, and Cypro-Minoan, in one small, dependency-light library.

Source on GitHub API reference User guide (wiki) Try it in your browser Benchmarks PyPI

Latest PyPI release: v0.75.0 (beta). See the scholarly workflow for source preservation, optional review, counting choices, and translation evidence.

The core installs with zero third-party dependencies and runs offline. The opt-in neural pipeline (grc-joint-v4) scores 97.4 UPOS / 96.5 UFeats / 95.0 lemma / 90.9 UAS / 86.5 LAS end-to-end on the UD Ancient Greek (Perseus) test fold (protocol and tables). Structural and generative outputs on undeciphered scripts (Linear A, Cypro-Minoan) carry an exploratory flag.

Quick start (60 seconds)

pip install pyaegean

Load a bundled corpus: 1,721 Linear A inscriptions, offline, no downloads:

import aegean

corpus = aegean.load("lineara")
ht13 = corpus.get("HT13")
[t.text for t in ht13.tokens][:6]
# ['KA-U-DE-TA', 'VIN', '𐄁', 'TE', '𐄁', 'RE-ZA']

Analyze a Greek sentence, one call, per-token records:

from aegean import greek

[(r.text, r.upos, r.lemma) for r in greek.pipeline("ἐν ἀρχῇ ἦν ὁ λόγος.")]
# [('ἐν', 'ADP', 'ἐν'), ('ἀρχῇ', 'NOUN', 'ἀρχή'), ('ἦν', 'VERB', 'εἰμί'),
#  ('ὁ', 'DET', 'ὁ'), ('λόγος', 'NOUN', 'λόγος'), ('.', 'PUNCT', '.')]

This default is a deterministic baseline for a first pass. Its tables and ending rules can return a wrong POS or lemma even when review_recommended is False. That flag selects identity/unresolved lemma fallbacks, not every error; for higher accuracy and calibrated risk-ranked review queues, activate the opt-in neural pipeline with greek.use_calibration_registry() (and optionally greek.use_oov_lemma_reranker(config="weighted")).

Read an inscription's editorial apparatus: the bundled Cypriot-syllabary corpus (Inscriptiones Graecae XV 1) carries a reading status on every word:

doc = aegean.load("cypriot").get("IG XV 1, 120")
[(t.text, t.status.name) for t in doc.tokens]
# [('a-ke-se-to-ro', 'CERTAIN'), ('to', 'CERTAIN'), ('pa-po', 'CERTAIN'),
#  ('pa-si-le-wo-se', 'RESTORED'), ('ti-mo-ke-re-to-se', 'RESTORED'), ('e-mi', 'RESTORED')]

Everything above runs offline with zero heavy dependencies. Prefer not to install anything? The 5-minute offline quickstart and getting-started notebook run in Colab, and the in-browser demo runs the core pipeline client-side.

Recent releases add the zero-dependency local Greek visual corpus browser (aegean.browser / aegean browse, with interlinear glosses, parallel translations, grammar/Strong's/LSJ/commentary inspectors, and a visual Library Manager), 8 categorized open-licensed Ancient, Classical, Patristic, and Byzantine Greek collections (3,844 works across 1,414 authors, 64.35M tokens, 8th c. BCE–1453 CE, including the complete open Greek corpus of John Chrysostom), first-class 56-book Septuagint (LXX) parity (adding Ecclesiastes, inline references, Masoretic Psalm numbering, and automatic offline interlinear), multi-script Aegean support in aegean workbench (workbench-app-v2.1.0), interactive annotation and conflict review in aegean tui (r key / aegean tui --review), portable SHA-256-verified research bundles (aegean.bundle / aegean bundle), named sentence policies (prose, verse, inscription, papyrus), compact editable review spreadsheets (layout="editable") with calibrated-risk prioritization, resumable SQLite corpus annotation jobs (aegean db annotate), contextual dictionary grounding for AI translation, lossless CoNLL-U preservation, and optional interoperability adapters for spaCy, Stanza, and CLTK. The Greek NLP guide shows runnable examples.

Find your path

I'm a classicist analyzing texts. Start with Getting Started (it assumes no prior programming), then Choosing a Workflow to match your task to a working pattern, and Recipes for end-to-end scholarly workflows, each ending in a citation. Greek NLP is the full reference for the pipeline (scansion, accentuation, IPA, tagging, lemmatization, parsing), and Greek Works & Books covers both Perseus/First1KGreek works and the 3,844 works in the 8 categorized Greek library collections.

I work with inscriptions or papyri. Using Critical Editions covers the eight fetchable epigraphic and papyrological corpora (I.Sicily, IIP, IOSPE, IGCyr/GVCyr, Aphrodisias IAph2007, Cretan Institutional Inscriptions, the EDH Greek subset, and the DDbDP documentary papyri), per-token reading statuses, and each corpus's edition-fidelity flag.

I study Biblical, Second Temple & Patristic Greek. Biblical & Koine Greek and the aegean.greek.bible reference cover the aegean bible CLI, the b screen in aegean tui (with dedicated Septuagint and Patristics tabs and inline downloads), 9 collated Greek NT editions (nestle1904, sblgnt, srgnt, bhp, tisch, wh, byz, antoniades, tr), 13 early 2nd–5th c. CE manuscript witnesses with nomina sacra expansion, 11,142-entry Extended Strong's with root tracing, the complete 56-book Septuagint (LXX) (lxx-corpus-v2, with Ecclesiastes, Masoretic Psalm numbering, and automatic offline interlinear), and 112 Greek patristic commentaries across 11 Church Fathers/traditions (First1KGreek, 26 John Chrysostom homily series, and Patrologia Graeca). Install themed packs at once with aegean bible install, aegean library install church-fathers (882 patristic works including all 155 John Chrysostom works), or aegean library install patristic (see aegean.library).

I study the Aegean scripts. Linear A is the per-script handbook (Linear B, Cypriot, and Cypro-Minoan have siblings), and Limitations states plainly what the undeciphered material can and cannot support.

I'm an NLP researcher and want the benchmark protocol. Benchmarks on this site is the canonical evaluation protocol and every published number; the wiki Benchmarks page adds the cited cross-tool comparison tables, and Choosing a Pipeline maps material to the right backend. Methodology explains the evidence registers, provenance, leakage controls, Aegean-script methods, and grounded-AI boundary.

I want to reproduce the public evidence or help maintain the project. Independent review starts with one offline command, explains exactly what its receipt does and does not establish, and links the model card, data card, limitations, discrepancy form, and bounded maintainer tasks.

Install

For persistent corpora and reviewed annotations, see the SQLite reference and review workflow.

The core is zero-dependency; everything heavier is an opt-in extra:

Install What it adds
pip install pyaegean Core + Linear A + Greek (zero heavy dependencies)
pip install "pyaegean[cli]" The aegean command line
pip install "pyaegean[tui]" The aegean tui full-screen terminal UI
pip install "pyaegean[neural]" The neural Greek pipeline and lemmatizer (onnxruntime; no torch)
pip install "pyaegean[interop]" spaCy/Stanza adapters plus CLTK on Python 3.13+; Stanza installs PyTorch
pip install "pyaegean[ai]" Anthropic / OpenAI / Grok / Gemini / OpenRouter clients, plus a local no-key option
pip install "pyaegean[mcp]" The aegean-mcp Model Context Protocol server (for agents)
pip install "pyaegean[all]" The bundled runtime stack, including neural; excludes Parquet, viz-interactive, and the separate framework adapters

Large assets (corpora, models, lexica) are never bundled: they fetch to a local cache, sha256-pinned, only when you opt in.

On this site

  • API reference: the supported facade modules, with their public classes and functions generated from the source.
  • Benchmarks: the measured accuracy numbers and the evaluation protocol behind them.
  • Independent review: the one-command evidence receipt, its limits, and the path from reproduction to a precise discrepancy report.
  • The project wiki holds the guides, tutorials, and per-script handbooks linked above.