Add lexicon ref resolution when copying a Paratext 9 import for editing
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 42/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
src/converters/pt9/lexiconResolver.ts、pt9ImportService、analysisMerger.ts、bareWordAnalyses.ts、Pt9ImportModal.tsx から着手し、ブロックされている issue #226 をもとに authority の規約を確定します。createEditableCopy と PT9 のインポートレポートを追跡し、refs が編集可能なコピー後も維持されること、および折りたたまれた sense の合計についてのカバレッジを追加します。完了の条件は、PT9 のインポートで refs が生成され、コピーがそれらを保持し、レポートが表示動作を変更せずに sense の合計をレンダリングすることです。
索引モデルが issue の本文から書いたものです。
説明
The PT9 import stack ships a lexicon-resolution seam with nothing plugged into it, so every import
persists gloss text and no lexicon refs. That deferral (#273) is right for the import project
itself. It is not right for an editable copy, which is the one place PT9 lexeme identity becomes
unrecoverable.
Current state
- The seam exists and is fully wired.
Pt9LexiconResolver
(src/converters/pt9/lexiconResolver.ts) offers
resolveEntry(key)->EntryRefandresolveSense(key, senseId)->SenseRef. Every ref site the
converter can produce already calls it: morphemeentryRef/senseRefand token-level
glossSenseRefinanalysisMerger.ts, morpheme refs on
bare-word payloads inbareWordAnalyses.ts. Outcomes are
counted in the import report (senses.entryRefsResolved/entryRefsUnresolved, same for senses). - Nothing supplies an implementation.
pt9ImportService.importPt9Projectcalls
convertPt9Project({ data, books, importedAt })with noresolver, so
unresolvedPt9LexiconResolverapplies, every lexeme counts as unresolved, and imported analyses
carry inlined gloss text and zero refs. - The identity is in the payload, not missing.
Pt9InterlinearProjectData.lexiconcarries
entrieskeyed by composed lexeme-key id andsenseswith ids and per-language glosses - the same
datapt9GlossSourcealready reads for gloss text. For PT9
the seam's work is minting refs from data in hand, not looking anything up.
Why the copy is the case that matters
lexiconResolver.ts records the current rationale: a PT9-authority ref "would store fine as a
foreign ref, but nothing would ever resolve it; re-importing recovers the identity instead."
That holds for the import project, which is frozen and replaced wholesale by savePt9Import on
every run. It does not hold for a copy:
createEditableCopyclones the analysis, keepssourceProjectId, and dropspt9Import.- Re-import finds its target through
getPt9ImportForSource, which matches onpt9Import. A copy
carries none, so no re-import ever touches one.
So the artifact the user actually edits and keeps is the one artifact whose dropped PT9 lexeme
identity cannot be recovered. Re-importing produces a fresh import project; the user's edits stay
behind in the old copy, still refless.
Ask
- Implement a PT9-authority resolver over the served
Pt9Lexiconand pass it from
pt9ImportService. - Name the authority constant (
paratext9, following whatever convention #226 fixes). - Decide
projectId. PT9's lexicon lives in the PT9 project, so the id space is partitioned and a
ref must carry one.LexiconRef.projectIdalready anticipates exactly this: "an authority whose
lexicon lives in a Paratext project may well use a Paratext project id here, even the analyzed
project's own." - Test the case this issue exists for: an import that carries refs, copied, still carries them.
- Fold and render
report.sensesin the import report summary.foldReport
(Pt9ImportModal.tsx) deliberately leaves it out today, since with no resolver every run
would show zero resolved;ReportTotalscarries a TODO pointing here.
Display does not change, and must not. No registered resolver declares paratext9, so per
#225/#269 every minted ref is foreign - never resolved, never dropped, rendered as the stored
free-form gloss, which import already inlines. These refs are provenance now and resolvable later.
Open questions
entryIdis not a GUID here. The model documentsEntryRef.entryIdasIEntry.id(GUID); a
PT9 ref carries a composed lexeme key (Stem:exauc,Word:a:2). Either that doc widens to
"whatever the authority mints" or PT9 refs need a different shape. Widening looks right -
authorities are opaque by design - but it should be written down, not assumed.- Senses with no id.
Pt9GlossOutcome.defaultSinglecan produce gloss text from a sense carrying
no id, andbareWordAnalysesonly attempts asenseRefwhen the languages agree on exactly one
id. Confirm an entry-only ref is the intended outcome there. - Minting only, or a provider too? Minting is self-contained. Actually resolving these refs needs
something that declares theparatext9authority - a PT9 lexicon provider, which is a live
candidate for the tier-1 slot in #46 and for #44's "create from Paratext 9 data." Mint regardless;
whether this issue also provides is the open part.
Non-goals
No PT9 lexicon provider, no lexicon UI, no writes to any lexicon. Minting refs during import and
keeping them through createEditableCopy.
Blocked on
#226, for the convention naming an authority constant. This is the first code path in the repo that
mints a ref, and #226 exists partly so the first writer does not improvise a label that then
persists.
Relationship
Completes #150's scope item 3 (gloss-text resolution) on the identity half - #150's open question
"import to glossSenseRef vs. literal gloss text vs. both?" is answered here as both. What a
resolvable ref renders as is #227's ladder.
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 0
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 55
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sillsdev/interlinearizer-extension のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
sillsdev/interlinearizer-extension#519 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
sillsdev/interlinearizer-extension#515 ·
メンテナーはふだん 1 日以内に返信
-
Reword "wipe" menu options and dialog対応中かも @alex-rawlings-yyc が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sillsdev/interlinearizer-extension#506 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
sillsdev/interlinearizer-extension#513 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
sillsdev/interlinearizer-extension#505 ·
メンテナーはふだん 1 日以内に返信
sillsdev/interlinearizer-extension の issue をすべて見る
似ている issue
-
backend refactor
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
NIAEFEUP/tts#927 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
callstackincubator/react-native-harness#296 ·
メンテナーはふだん 1 日以内に返信
-
status:in-linear
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
verified
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 5 日以内に返信
-
Add inputmode attribute support (forwarded to the inner input)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Neovici/cosmoz-input#467 ·
メンテナーはふだん 1 日以内に返信