sillsdev / sillsdev/interlinearizer-extension
Open Concordance
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 0
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 55
Description
A concordance over the source text: every occurrence of every surface form in the book or draft, whether or not it has been analyzed. This issue covers the surface itself — the index, the panel, the rows, and jump-to-occurrence. Search, sort, and filtering are #50.
Scoping stub. This issue was title-only; the body below was drafted from the surrounding code and issues to make it schedulable, and records open questions rather than deciding them. Correct it freely.
What distinguishes this from the Analysis Catalog (#186)
They index different things, which is why both exist:
| Analysis Catalog (#186) | Concordance (this) | |
|---|---|---|
| Row is | a distinct TokenAnalysis |
a distinct surface form in the text |
| Unanalyzed tokens | absent | present — that is the point |
| Data source | TextAnalysis in Redux, no text reads |
the tokenized Book, no analysis needed |
#186 says this outright: "Not a concordance: the catalog indexes analyses, so an unanalyzed token does not appear in it. Coverage questions ('what haven't I glossed?') are out of scope and belong to #50 / #117."
Scope
- Index. Group the tokenized book's tokens by surface form. Bucket on
normalizeSurfaceForm(src/utils/analysis-identity.ts) — the identity normalization, not the search fold, which must never be used for bucketing. - Row model. Surface form, total occurrence count, occurrence count in the current book, occurrence locations (each token already carries a
refof the form"GEN 1:1:5";bookOfRefinsrc/utils/analysis-book.tsparses the book code). Inline location list capped with an expander. - Analysis status per row. Whether the form is glossed, partly glossed (some occurrences analyzed, some not), or unglossed. This is the join back to
TextAnalysisand is what makes the concordance answer coverage questions the catalog can't. - Panel + command.
interlinearizer.openConcordance, registered inmain.tsandcontributions/menus.json, with strings incontributions/localizedStrings.json. - Jump to occurrence. Clicking a location navigates the interlinear view to that token and focuses it, panel staying open — the same behavior #193 builds for catalog usages.
Reuse
Most of the machinery is being built by the catalog issues and should not be built twice:
- Panel shell, row windowing, jump-to-usage navigation — all land in #193. Whatever that issue produces (it proposes a small
useRowWindowfollowing theuseSegmentWindow/ IntersectionObserver precedent) should be factored so a second list can use it. - Search fold —
src/utils/search-fold.tsfrom #192 (in review). #50 will need it; do not add a second fold.
The scale difference to design for
The catalog's row count is bounded by how much the user has analyzed. A concordance's is bounded by the vocabulary of the text, and its index is built from the text layer, which the editor loads one book at a time. #186 could afford whole-draft scope precisely because it has zero data dependency; this issue does not get that for free.
Open questions
- Book or draft scope? Whole-draft means loading every book's USJ; current-book-only is cheap but answers a narrower question. This is the main sizing decision.
- Placement — a second panel beside the interlinear view, a tab alongside the catalog panel, or its own WebView? (A separate WebView means a separate Redux store and no live sync — see the note in #186.)
- Does a row group by surface form or by lemma? Lemma grouping needs the lexicon and would make this depend on #44 / #46.
- Should this go to
user-questions.mdfor review outside the dev team? (per AGENTS.md UX-decisions guidance)
Related: #50 (search over this index), #186, #193, #117, #155.
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/utils/analysis-identity.ts and src/utils/analysis-book.ts to understand surface bucketing and token references, then review #193's panel and navigation work. Check main.ts, contributions/menus.json, and contributions/localizedStrings.json for the command integration. Before implementation, resolve the book-versus-draft scope and panel placement; done means the concordance lists surface forms, coverage status, locations, and jump-to-occurrence behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100