Skip to content

aegean.browser

Local Greek visual corpus browser server and JSON analysis service (serve, create_server, BrowserServer). Serves an interactive three-pane web reader over loopback for any bundled, cached, or open-licensed Greek text in PyAegean — with toggleable interlinear glosses, parallel translations, hover dependency highlighting, parallel grammar/lexicon/context/stats inspectors, Strong's root trees, patristic commentaries, metrical scansion, FTS5 search, live NLP engine toggles, a visual Library Manager, and CoNLL-U/CSV/JSON export.

browser

Local interactive visual corpus browser for Ancient, Classical, Biblical & Byzantine Greek.

Launches a zero-dependency loopback web application backed directly by PyAegean's live Greek NLP, Biblical, lexicon, commentary, metrical scansion, search, and library engines.

Usage::

import aegean
aegean.browser.serve("John 1:1-18")          # opens in your browser; Ctrl-C to stop
srv = aegean.browser.create_server("greek")  # non-blocking handle (srv.url, srv.stop())

From the command line::

aegean browse "John 1:1-18"
aegean browse "Gen 1:1-5" --neural

BrowserServer dataclass

BrowserServer(host: str, port: int, url: str, _httpd: ThreadingHTTPServer, _thread: Thread)

Handle for a running local Greek Visual Corpus Browser HTTP server.

stop

stop() -> None

Shut down the HTTP server and join its background thread.

create_server

create_server(target: str | None = None, *, doc_index: int = 0, edition: str = 'nestle1904', port: int = 8765, auto_port: bool = True, host: str = '127.0.0.1', neural: bool = False, offline: bool = False, open_browser: bool = False) -> BrowserServer

Start the local Greek visual corpus browser in a background thread and return its handle.

serve

serve(target: str | None = None, *, doc_index: int = 0, edition: str = 'nestle1904', port: int = 8765, auto_port: bool = True, host: str = '127.0.0.1', neural: bool = False, offline: bool = False, open_browser: bool = True, background: bool = False) -> BrowserServer | None

Launch the local Greek visual corpus browser.

By default, starts the server, opens the URL in your system browser, and blocks until Ctrl-C (mirroring aegean workbench). Pass background=True to return a :class:BrowserServer handle immediately (useful in scripts, notebooks, and tests).

activate_lexicon_payload

activate_lexicon_payload(lexicon_id: str, *, offline: bool = False) -> dict[str, Any]

Activate (fetching to cache if needed) a hosted Greek dictionary or Extended Strong's.

analyze_text_payload

analyze_text_payload(text: str, *, betacode: bool = False, translation: str | None = None, title: str = 'Custom Greek Passage') -> dict[str, Any]

Analyze arbitrary pasted Greek (or Beta Code) text for interactive reading & inspection.

analyze_word_payload

analyze_word_payload(surface: str, *, lemma: str | None = None, upos: str | None = None, xpos: str | None = None, feats: str | None = None, robinson: str | None = None, strongs: str | None = None, sentence_text: str | None = None, token_index: int | None = None, book: str | None = None, include_study: bool = True) -> dict[str, Any]

Return deep linguistic, grammatical, lexical, etymological, and concordance data for one word.

bible_commentaries_payload

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

List patristic commentaries (Catenae, Origen, John Chrysostom, Cyril PG).

bible_commentary_excerpt_payload

bible_commentary_excerpt_payload(book: str, *, work_id: str | None = None, query: str | None = None, ref: str | None = None, limit: int = 5, offline: bool = False) -> dict[str, Any]

Fetch Greek patristic commentary excerpts for a Biblical book/work/term.

bible_editions_payload

bible_editions_payload(book: str, ref: str, *, offline: bool = False) -> dict[str, Any]

Compare available Greek NT editions word-by-word for a book & passage.

bible_psalm_payload

bible_psalm_payload(number: int, direction: str = 'mt_to_lxx') -> dict[str, Any]

Convert Psalm numbers between Masoretic (Hebrew/English) and Septuagint (LXX).

bible_witnesses_payload

bible_witnesses_payload(book: str, ref: str, *, offline: bool = False) -> dict[str, Any]

Compare 2nd–5th c. Greek NT manuscript witnesses (CNTR MES) for a passage.

catalog_payload

catalog_payload() -> dict[str, Any]

Return the complete Greek corpus, Bible, collection, lexicon, and engine catalog.

collections_payload

collections_payload(*, collection: str | None = None, query: str | None = None, period: str | None = None, limit: int = 60, offset: int = 0) -> dict[str, Any]

Browse and filter all 3,844 open-licensed Greek library works offline.

configure_engine_payload

configure_engine_payload(options: dict[str, Any], *, offline: bool = False) -> dict[str, Any]

Toggle PyAegean Greek NLP runtime options (neural, treebank, reranker, calibration).

document_payload

document_payload(target: str, *, doc_index: int = 0, ref: str | None = None, edition: str = 'nestle1904', numbering: str = 'lxx', max_tokens: int = 500, offset: int = 0, offline: bool = False) -> dict[str, Any]

Load any PyAegean Greek corpus, Bible passage, collection work, or file for the visual reader.

engine_status_payload

engine_status_payload() -> dict[str, Any]

Return the active PyAegean Greek NLP backend, lexica, and provider status.

export_payload

export_payload(*, fmt: str, title: str, sentences: list[dict[str, Any]], blocks: list[dict[str, Any]]) -> tuple[str, str, str]

Export currently viewed tokens as JSON, CoNLL-U, or CSV.

Returns (content, content_type, filename).

library_fetch_payload

library_fetch_payload(dataset: str) -> dict[str, Any]

Install a PyAegean dataset, Greek work, or curated pack into the local cache.

library_payload

library_payload() -> dict[str, Any]

Return local PyAegean Library Manager status (datasets, categories, and curated packs).

library_remove_payload

library_remove_payload(dataset: str) -> dict[str, Any]

Remove a downloaded PyAegean dataset, Greek work, or pack from the local cache.

scan_lines_payload

scan_lines_payload(lines: list[str], *, meter: str = 'hexameter') -> dict[str, Any]

Scan one or more lines of Greek verse across PyAegean's metrical scanners.

search_payload

search_payload(query: str, *, target: str = 'bible', limit: int = 30, offline: bool = True) -> dict[str, Any]

Search Greek NT/LXX or any FTS5-indexed corpus and return jump-ready hits.

word_study_payload

word_study_payload(query: str, *, offline: bool = True) -> dict[str, Any]

Run a unified Strong's + NT + LXX word study for any Greek lemma or Strong's ID.