sillsdev / sillsdev/languageforge-lexbox

Expose morphosyntactic analyses (MSA) so interlinearizer GrammarRef can resolve

Open
#2,559 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: #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 IEntryServicegetMsa(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

  • 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 with backend/FwLite/FwDataMiniLcmBridge/Api/MorphoSyntaxExtensions.cs and the GrammarRef declaration in src/types/interlinearizer.d.ts; compare the five LCM MSA classes with the current Sense.PartOfSpeechId projection. Then trace the FwData/CRDT/Harmony and FwLiteWeb entry points, plus platform.bible-extension/src/types/lexicon.d.ts and IEntryService. Done means an agreed MSA model round-trips, is exposed through the web and API surfaces, and GrammarRef resolves it by project and ID.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.