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
- 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).
- Read/write it in the FwData bridge (
IMoMorphSynAnalysis ⇄ MiniLcm) and in the CRDT/Harmony bridge, and surface it on the FwLiteWeb routes.
- 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
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):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:
Sense.PartOfSpeechId.backend/FwLite/FwDataMiniLcmBridge/Api/MorphoSyntaxExtensions.csswitches 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.platform.bible-extension/src/types/lexicon.d.tshas no MSA type, andIEntryServicehas no MSA methods.#2249closed the analogous gaps for entries and senses by addinggetEntry/getSense. This is the same shape of request for MSAs, except that it also requires new model surface, not just a new lookup.Ask
Id, MSA kind, part of speech, and — at minimum for round-tripping — the fields the LCM subclasses carry beyond POS).IMoMorphSynAnalysis⇄ MiniLcm) and in the CRDT/Harmony bridge, and surface it on the FwLiteWeb routes.platform.bible-extension/src/types/lexicon.d.tsand add a by-id lookup onIEntryService—getMsa(projectId, msaId)or equivalent — soGrammarRefresolves.Scope note
This is the larger of the two siblings. MSA is not one shape but five LCM subclasses, and
Sense.PartOfSpeechIdis 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 whetherSense.PartOfSpeechIdstays as-is (derived) or is superseded — the answer determines whether this is additive or a breaking model change. Worth sizing before committing.Blocks