Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Re-anchoring misplaces approvals when a verse repeats a word

オープン
#379 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
54/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
2
フォーク
0
平均マージ
2日 3時間
マージ済み PR(30日)
46

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sillsdev/interlinearizer-extension のほかの issue

sillsdev/interlinearizer-extension の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。