Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Re-anchoring misplaces approvals when a verse repeats a word

Aperta
#379 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
backend

Direzione di ricerca

Start with reanchor-analysis.ts and its discussion of ambiguity from a TokenSnapshot; trace how approvals are stored and reanchored when source text changes. The issue suggests recording the form's occurrence count at approval time. Done means changing the first occurrence in the described verse leaves that approval stale rather than transferring it to the remaining identical word.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Editing a glossed word moves its approval onto an identical word later in the verse

Approving an analysis on a word, then changing that word's spelling in the source text, moves the approval onto another occurrence of the same word in the verse instead of marking it stale.

Steps:

  1. In a verse reading "Wug blicket wug", approve the gloss "dig" on the first "Wug". The second "wug" now only suggests "dig".
  2. Change the first "Wug" to "Wig" in the source text.

Expected: the approval on the first word goes stale.
Actual: "dig" is approved on the second "wug".

Cause: stored links record only the glossed words, not the whole verse. Respelling "Wug" therefore looks the same as deleting it, and the one "wug" left (matching ignores case) is taken for the same word, shifted by the edit. reanchor-analysis.ts already names this ambiguity as unresolvable from a TokenSnapshot. Fixing it likely means recording, at approval time, how many times the form occurs in the verse.

Merged from #384: Don't stale both copies of a repeated word when they share a gloss

When a verse has two glossed copies of a word and an edit leaves only one, re-anchoring stales both because it can't tell which copy survived. Repro: gloss both "wug"s in "Wug blicket wug" as "dig", then change the text to "Wug blicket wig". Both links go stale instead of only the second.

When the copies carry the same analysis, it makes no difference which one survived, so the remaining word should keep its approval and only the edited copy should go stale. Copies count as the same only when every link naming them matches; a copy inside a phrase differs from one outside it. Copies with different analyses keep staling together as now, since "bank bank" → "bank" can't say which sense was deleted.

The ambiguity check in alignForms (src/utils/reanchor-analysis.ts) compares occurrence counts by word only, without looking at which analysis each copy carries.

Related to #379, the reverse case: a single glossed copy whose approval moves onto an unglossed copy of the word. Its proposed fix, recording how often the word occurs in the verse, doesn't settle this one, because the count can't say which copy survived.

Lingua principale
TypeScript
Stelle
2
Fork
0
Merge medio
2g 5h
PR unite (30g)
42

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sillsdev/interlinearizer-extension

Tutte le issue di sillsdev/interlinearizer-extension

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.