Projects BibleWeb Interlinear Greek word popup (NT)
Done

Greek word popup (NT)

Area: Interlinear Milestone: v2

Context

Problem: English Bible translations lose information. The Greek New Testament has nuances — verb tenses, word roots, semantic ranges — that no single English word captures. Serious Bible students need access to the original Greek.

Solution: An interactive interlinear popup that shows every Greek word in a verse with its transliteration, Strong's number, and English gloss. Users can click words to expand definitions, explore alternative translations, and build a personal word-by-word translation.

Not included: Full grammatical parsing or syntax diagrams. This is word-level analysis, not sentence-level.

Functional

When a user opens the interlinear popup for a New Testament verse, they see every Greek word displayed as a card with its linguistic data.

User flow:

  1. User clicks a verse → context menu → "Greek/Hebrew"
  2. Popup opens showing the verse reference, full verse text (EN + NL), and a grid of Greek word cards
  3. Each card shows: Greek text, transliteration, Strong's number, short English gloss
  4. Click a card → expands to show: full definition, synonyms, selectable meaning chips, "Translated as" frequency list
  5. At the bottom: composed "Your Translation" bar showing assembled glosses

Per-word data displayed:

  • Greek surface form (pilcrow characters stripped)
  • Transliteration (Romanized Greek)
  • Strong's number (e.g., G3588)
  • Short gloss (from bsb_gloss or kjv_usage heuristic)
  • Expanded: full definition (truncated 300 chars), synonyms, meaning chips (up to 12), KJV usage frequency with drill-down

Edge cases:

  • "Absorbed" words: Greek articles/particles sometimes merged into English translation — shown with isAbsorbed flag
  • Pro+ tier required (interlinear feature gate)
  • Dutch mode: uses sv_gloss for word alignment, meaningsNl for Dutch alternatives

UX & Design

Word cards: Grid layout, each card showing Greek text (teal accent), transliteration, Strong's number, and gloss. Click to expand.

Expanded card: Full definition, "Also: ..." synonyms, selectable meaning chips, "Translated as" frequency list with clickable example verses.

Composed translation bar: Fixed at bottom — "YOUR TRANSLATION: [word1] [word2] ..."

Technical

API: GET /api/interlinear/{bookId}/{chapter}/{verse}?verseText=...&dutchVerseText=...

  • Calls getGreekWords() — joins greek_words to verses, ordered by word_position
  • Batch-fetches strongs_greek entries via getStrongsGreekBatch()
  • Builds WordDisplay[] via buildGreekWordDisplays() in popup.ts

DB tables: greek_words (word_position, transliteration, bsb_gloss, sv_gloss, strongs_number), strongs_greek (definition, transliteration, kjv_usage, definition_nl, meanings_nl)

Files:

  • apps/web/src/lib/components/bible/InterlinearPopup.svelte — main popup
  • apps/web/src/routes/api/interlinear/[bookId]/[chapter]/[verse]/+server.ts — word data API
  • apps/web/src/lib/server/queries/greek-words.tsgetGreekWords()
  • apps/web/src/lib/server/queries/strongs.tsgetStrongsGreekBatch()
  • apps/web/src/lib/utils/popup.tsbuildGreekWordDisplays()
  • apps/web/src/lib/utils/text.tsextractGreekMeanings(), extractGreekGloss()

Status

Current: DONE Milestone: v2 Priority: High — signature Pro feature for serious Bible study

History:

  • BibleGame had a simpler Greek popup with fewer details
  • Web version significantly expanded with KJV usage drill-down and personal translation builder

Dependencies:

  • Requires: greek_words data (DONE), strongs_greek data (DONE), TAGNT dataset
  • Enables: personal translation builder (DONE), Strong's concordance search (DONE)