Projects BibleWeb Parallel Gospels Word-match highlighting across gospels
Planned

Word-match highlighting across gospels

Area: Parallel Gospels Milestone: v2

Context

Problem: When comparing Gospel accounts side by side, users want to see which words are shared between accounts and which are unique — revealing how each Gospel writer told the same story differently.

Solution: Highlight shared significant words across Gospel columns using a 5-color palette. Common stop words are filtered out. Toggle with M key or a button.

Not included: Semantic similarity or synonym matching. This is literal word matching only.

Functional

Expected user flow:

  1. User is viewing a parallel Gospel passage
  2. Presses M key or clicks a "Match words" button
  3. Words that appear in multiple Gospel columns are highlighted with colors
  4. Each shared word gets a consistent color across all columns
  5. Stop words (the, and, is, etc.) are excluded
  6. Press M again to toggle off

5-color palette:

  • Teal: #2dd4bf
  • Gold: #fbbf24
  • Rose: #fb7185
  • Green: #4ade80
  • Lavender: #c4b5fd

UX & Design

Toggle: M key or button in the parallel view header.

Highlighting: Background color on matched words. Same color for the same word across all columns.

Technical

Implementation:

  • Compute significant word intersection across columns (exclude stop words)
  • Assign colors from the 5-color palette to matched words
  • Wrap matched words in <span> with background color
  • Toggle via local state

Files:

  • apps/web/src/lib/components/bible/ParallelVerseView.svelte (modify)

Status

Current: PLANNED Milestone: v2 Priority: Medium — enhances comparative study

Dependencies:

  • Requires: side-by-side columns (DONE)