sillsdev / sillsdev/languageforge-lexbox

Expose allomorphs (IMoForm) so interlinearizer AllomorphRef can resolve

Open
#2,558 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💻 FW Lite 📖 MiniLcm 📙 Platform.Bible enhancement
Dominant language
C#
Stars
9
Forks
8
Avg merge
2d 13h
Merged PRs (30d)
49

Description

Split out from sillsdev/interlinearizer-extension#26 (see the triage comment and the follow-up). Sibling issue: #2559 (MSA / GrammarRef).

Problem

The interlinearizer's interlinear model references allomorphs by GUID via AllomorphRef (src/types/interlinearizer.d.ts):

export interface AllomorphRef {
  /** `IMoForm.id` (GUID). */
  allomorphId: string;
  projectId?: string;
}

Nothing in the lexicon stack can resolve that GUID today:

  • MiniLcm has no allomorph model. Entry carries a LexemeForm (MultiString) and a MorphType (MorphTypeKind), but individual IMoForm objects — the lexeme form and the alternate forms hanging off an entry — are not represented. The only place IMoForm appears is backend/FwLite/FwDataMiniLcmBridge/Api/LcmHelpers.cs, where it is created internally and immediately collapsed into Entry.LexemeForm. Allomorph identity (the GUID) is lost.
  • The Platform.Bible lexicon extension exposes nothing for it. platform.bible-extension/src/types/lexicon.d.ts does not export an allomorph type, and IEntryService has no allomorph methods. Consumers can only infer detail indirectly from IEntry.lexemeForm and IEntry.components.

#2249 closed the analogous gaps for entries and senses by adding getEntry / getSense. This is the same shape of request for allomorphs, except that it also requires new model surface, not just a new lookup.

Ask

  1. Add an allomorph model to MiniLcm (stable Id, form as a MultiString, MorphTypeKind, owning entry id, and whether it is the entry's lexeme form vs. an alternate form).
  2. Read/write it in the FwData bridge (IMoForm ⇄ MiniLcm) and in the CRDT/Harmony bridge, and surface it on the FwLiteWeb routes.
  3. Export the type from platform.bible-extension/src/types/lexicon.d.ts and add a by-id lookup on IEntryServicegetAllomorph(projectId, allomorphId) or equivalent — so AllomorphRef resolves without walking entries.

Scope note

Point 1 fans out further than the interlinearizer JSDoc suggests: adding a MiniLcm model means touching the FwData bridge, the CRDT bridge, sync, and the FwLiteWeb API surface, not just re-exporting an existing type. Worth sizing before committing — it may be worth splitting the MiniLcm/backend work from the extension-surface work.

Blocks

  • sillsdev/interlinearizer-extension#189 — Analysis Catalog: morpheme rows

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading backend/FwLite/FwDataMiniLcmBridge/Api/LcmHelpers.cs, then inspect the CRDT/Harmony bridge and FwLiteWeb routes to map how existing lexicon models are read, written, synced, and exposed. Compare the requested model with platform.bible-extension/src/types/lexicon.d.ts and IEntryService; done means an allomorph can round-trip through the bridges and resolve by ID through the extension API.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, typescript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.