sillsdev / sillsdev/interlinearizer-extension
`confidence` means two different things, and its type docs cite fields PT9 never sends
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 0
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 55
Description
Two problems in one field's story — one semantic, one documentation.
1. confidence is claimed twice
PT9 import spends AnalysisLink.confidence on anchor ambiguity: confidence: 'low' marks a record whose token placement was a guess among equal folded forms (analysisMerger.ts:339, :406).
#254 proposes spending it on approval provenance — stamping a bulk-approved link lower than a hand-approved one, so "approved" doesn't collapse "a human read this" with "a human swept a hundred of these" (#254's Confidence bullet, which relates it to #51 and #53, never to PT9). #51 is on hold as of 2026-08-25, so #254 is the live claimant.
Two different meanings for one per-assignment field, and neither issue records the collision. Decide which meaning confidence carries, and what mechanism the loser gets — a separate field, a flag on the link, or nothing.
Note the import use is already shipped and sitting in persisted data, so changing its meaning is a migration question, not only a naming one.
2. The type docs cite fields the format never sends
interlinearizer.d.ts:970 still says Paratext status / confidence are "inferred from InterlinearLexeme.IsGuess and .Score". The PT9 interlinear data we consume has neither — no IsGuess, no Score, only VerseData.Hash — and the shipped code means something else by both: status comes from Hash plus Excluded plus the merger's demotion rules, confidence from anchor ambiguity as above.
The doc points at a source that does not exist, for a field whose real meaning is question 1. Fix it once 1 is decided, rather than twice.
Size: S — a decision plus a doc fix; larger if the decision forces a new field.
Priority: P2 — nothing is broken for a user today, but #254 cannot stamp anything until this is settled.
Drafted by Claude
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/types/interlinearizer.d.ts:970 and the PT9 import uses at analysisMerger.ts:339 and :406, then review the linked confidence discussion in #254. Determine and document one meaning for confidence, define what happens to the other meaning, and update the type documentation to match the shipped PT9 fields; account for persisted-data migration if the field meaning changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design, documentation
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100