Skip to content

Gita Tier-1 deep reader (chapter 2 proof): free dictionary-grounded hover+sound+etymology - #136

Merged
anantham merged 2 commits into
mainfrom
feat/fable-gita-tier1
Jul 28, 2026
Merged

Gita Tier-1 deep reader (chapter 2 proof): free dictionary-grounded hover+sound+etymology#136
anantham merged 2 commits into
mainfrom
feat/fable-gita-tier1

Conversation

@anantham

Copy link
Copy Markdown
Owner

The Hybrid free layer proven on BG ch2 at /gita/chapter/2 — deep reader with per-akshara sound + Monier-Williams hover glosses + etymology, mechanically assembled from public-domain sources, no LLM-authored glosses. Sound 100% clean; dictionary meaning ~70% confident / ~30% honestly blank (no guessed meanings — resisted the 99.9% any-gloss Goodhart trap). For operator eyeball before scaling to all 18 chapters.

🤖 Generated with Claude Code

https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi

…of of the free layer)

The operator-chosen "Hybrid" plan's free layer, proven on BG chapter 2
(72 verses) at /gita/chapter/2: the deep interleaved reader with
per-akshara sound + hover dictionary meanings + etymology mode, assembled
mechanically from public-domain sources — NO LLM authored any gloss.

Pipeline (chapter-parameterized, scales to all 18):
- Sanskrit mūla: sa.wikisource (PD); the whitespace-token surface obeys
  the surface law by construction (2.50-2.72 matches the pilot
  bg2-source.ts byte-for-byte).
- Padaccheda: sanskrit_parser (rule-based sandhi split, deterministic) —
  used only to find lemmata, never touches the surface.
- Glosses: Monier-Williams via Cologne (PD), confidence-filtered — direct
  hits + clean ≤3-piece compounds kept; letter-name garbage, homograph
  stubs, and stem-mismatched particles BLANKED. No word shows a guessed
  meaning (99.9% naive "any-gloss" was a Goodhart trap; the filter makes
  "no gloss rather than a guess" literal).
- Sound: the app's own devanagari romanizer — IAST = romanize(surface),
  so romanizationMatches holds by construction (100% gate pass, 0 guessed
  sounds).

Coverage (this chapter): sound 100%, dictionary meaning ~70% confident /
~30% honestly blank. Content words genuinely useful; function words +
Vedic-first MW sense-ordering are the visible mechanical wall (muni →
"impulse") — exactly what the reserved Tier-2 alignment curation covers,
and the famous 2.50-2.72 verses already carry curated pilot glosses.

Route /gita/chapter/2 wired before the /gita catch-all; index card added.
tsc clean; 32 gita tests + full liturgy suites green; build green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexicon-forge Ready Ready Preview, Comment Jul 28, 2026 3:12pm

…g, lazy-loaded chunk

P1 (wrong glosses on common words): the scorer picked any parse that hit
Monier-Williams regardless of fit, so पार्थ mapped to a stray patronymic,
एषा (pronoun "this") read as the verb-root "gliding, running", मुनि as
"impulse". Added a curated OVERRIDE table (~40 particles/pronouns/names/
epithets) that takes precedence over the dictionary at both word and
sandhi-piece level, and the scorer now counts override lemmas (so
सञ्जय wins whole-word instead of splitting to san+jaya). Ambiguous
non-override words prefer BLANK over a low-fit hit. Verified via the real
module loader: पार्थ → "O son of Pṛthā — Arjuna", एषा → "this",
केशव → "Keśava — Kṛṣṇa", न → "not". Coverage 70.1% → 83.5%, 0 garbage.

P2 (cache poisoning): transient Cologne failures no longer write "" into
mw-cache.json — only completed lookups cache, so a timeout retries.

P2 (bundle bloat): the ~468KB chapter module is now code-split — the
route is React.lazy + Suspense and the page dynamically imports the data.
Build confirms chapter2-tier1 (260KB/40KB gz) + GitaChapter2Page (7KB) as
separate chunks; the bg2t1 marker is absent from the main bundle.

tsc clean; 7249 tests green; build green with the chunk split.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117Ksuo6oeSBw4iTq3yzfYi
@anantham

Copy link
Copy Markdown
Owner Author

Codex findings adjudicated & fixed: P1 — curated override table for particles/pronouns/names takes precedence over the dictionary (पार्थ, एषा, केशव, न all correct-or-blank now; coverage 70→83.5%, 0 garbage; verified via the real module loader); P2 — transient lookup failures no longer poison the cache; P2 — the 468KB chapter data is code-split out of the main bundle (separate chunks confirmed). 7249 tests green.

@anantham
anantham merged commit dc91ba1 into main Jul 28, 2026
1 of 2 checks passed
@anantham
anantham deleted the feat/fable-gita-tier1 branch July 28, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant