Skip to content

Expose morphosyntactic analyses (MSA) so interlinearizer GrammarRef can resolve #2559

Description

@imnasnainaec

Split out from sillsdev/interlinearizer-extension#26 (see the triage comment and the follow-up). Sibling issue: #2558 (allomorph / AllomorphRef).

Problem

The interlinearizer's interlinear model references morphosyntactic analyses by GUID via GrammarRef (src/types/interlinearizer.d.ts):

export interface GrammarRef {
  /** `IMoMorphSynAnalysis.id` (GUID). */
  msaId: string;
  projectId?: string;
}

An MSA ties grammatical information — part of speech, inflection class, stem features — to a specific (entry × sense × allomorph) usage. Nothing in the lexicon stack can resolve that GUID today:

  • MiniLcm has no MSA model. MSAs are flattened to a single field: Sense.PartOfSpeechId. backend/FwLite/FwDataMiniLcmBridge/Api/MorphoSyntaxExtensions.cs switches over the five LCM MSA classes (MoStemMsa, MoDerivAffMsa, MoDerivStepMsa, MoInflAffMsa, MoUnclassifiedAffixMsa) purely to get/set a part of speech. The MSA's own identity, its class, and everything beyond POS are dropped.
  • The Platform.Bible lexicon extension exposes nothing for it. platform.bible-extension/src/types/lexicon.d.ts has no MSA type, and IEntryService has no MSA methods.

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

Ask

  1. Add an MSA model to MiniLcm (stable Id, MSA kind, part of speech, and — at minimum for round-tripping — the fields the LCM subclasses carry beyond POS).
  2. Read/write it in the FwData bridge (IMoMorphSynAnalysis ⇄ 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 IEntryService — getMsa(projectId, msaId) or equivalent — so GrammarRef resolves.

Scope note

This is the larger of the two siblings. MSA is not one shape but five LCM subclasses, and Sense.PartOfSpeechId is currently the lossy projection of all of them. Decide up front whether MiniLcm models the full polymorphic set or a reduced form good enough for interlinear display, and whether Sense.PartOfSpeechId stays as-is (derived) or is superseded — the answer determines whether this is additive or a breaking model change. Worth sizing before committing.

Blocks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request💻 FW Liteissues related to the fw lite application, not miniLcm or crdt related📖 MiniLcmissues related to miniLcm library code, includes fwdat bridge and lcmCrdt📙 Platform.Bible

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions