Cross-language conjugation comparison (#414)

The Bridge Method’s vertical morpheme alignment (docs/features/bridge_method.md — EuRom5’s falavam / hablaban / parlaven / parlavano / parlaient) on the conjugation detail page: for a signed-in learner, the same tense and person shown across their known Bridge languages (user_languages) plus the target, in canonical continuum order PT–ES–CA–IT–FR–EN, rendered with the shipped bridge_equivalence_table register.

The two correspondence problems

Tense and lemma names are per-language natural data, so “the same tense/person in another language” needs two mappings:

  • Tenses: config/bridge_tenses.yml maps canonical tense ids (present, imperfect, compound_past, simple_past, future, conditional, subjunctive_present) to each language’s stored [mood, tense_name] pair, read through Resources::Verbs::BridgeTenses. English rows are functional equivalents (no imperfect exists; its dataset’s Preterite carries the past-continuous readings, which is exactly the imperfect’s meaning). Catalan names follow the standard grammar but are unverified against stored rows — the dev database has no ca tenses/conjugations. A tense outside the map simply shows no comparison.
  • Lemmas: Resources::Verbs::LemmaCorrespondence resolves counterpart VerbLemmas through verb_lemma_translations, which are free text — comma-separated synonym lists (“hablar, charlar”) and English “to “-prefixes. Each candidate is normalized and tried in order until one matches; since (language, lemma) is unique, the first match is the match.

Correspondence audit (dev data, bin/rails bridge_verbs:correspondence_audit)

From ca en es fr it pt
ca 94% 100% 97% 87% 98%
en 16% 22% 19% 17% 22%
es 2% 83% 3% 2% 2%
fr 85% 97% 98% 92% 97%
it 72% 92% 95% 94% 94%
pt 0% 74% 0% 0% 0% 0%

Reading: rows are the target lemma’s language (the comparison resolves target → known). fr/it/ca targets resolve richly; es/pt lemmas mostly carry only English translations, and en lemmas are sparsely translated. Gap-fill approach: (1) reverse resolution — when es→fr is missing, search fr translations pointing back at the es lemma (needs a list-contains SQL match; not implemented yet); (2) an LLM batch pass filling missing Romance↔Romance translation rows once #390 lands a backend. Since the comparison degrades gracefully (unresolvable rows just drop), shipping ahead of the gap fill is safe.

Card hook

“Add comparison card” on the comparison creates a standard VerbCard for the target conjugation in an auto-created “Bridge comparisons” deck, with the aligned forms stored as card_sources metadata (source_role: bridge_comparison, {canonical_tense, forms: {lang => form}}) — provenance for a future contrastive card template. Idempotent per (user, conjugation).

Follow-ups

  • Reverse lemma resolution and/or LLM gap fill (above).
  • Two-color stem/ending highlighting from EuRom5’s alignment boxes (needs morpheme segmentation; the table shows whole forms for now).
  • Verify/add Catalan tense names once ca conjugation data is loaded.

This site uses Just the Docs, a documentation theme for Jekyll.