sillsdev / sillsdev/TheCombine
SemanticDomain -> LivingDictionaries mapping
@imnasnainaec is already working on this.
Since Jul 14, 2026.
- Dominant language
- TypeScript
- Stars
- 22
- Forks
- 10
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 9
Description
Summary
Build a curated mapping from DDP4 semantic-domain codes to Living Dictionaries' (LD) 69-key domain list. Semantic domains are the single hardest field to map from LIFT to LD, and every LIFT → LD import path needs this table to place entries in LD's domains systematically instead of dropping them. Highest leverage per unit effort of the #4325 work, and a hard input dependency for an importer.
Background
- FieldWorks & The Combine use semantic domains (DDP4): ~1,792 hierarchical codes, 4 levels (e.g.
2.1.1 Head), carried in LIFT assemantic-domain-ddp4traits +.lift-ranges. - LD uses its own list: 69 selectable two-level keys (e.g.
5.3), in site/src/lib/mappings/semantic-domains.ts, "modeled after SemDom with some adjustments." - LD's only precedent map (
scripts/import/FLEx/semanticDomains.ts) is hand-built for one dictionary (Torwali) and not generalized. No general table exists.
Scope — DDP4 → LD (required)
Many-to-one: every DDP4 code → exactly one LD key, mostly keyed on DDP4's top-two numeric levels.
- Deliverable: a data file (DDP4 code → LD key), plus a short rationale doc for the non-mechanical choices.
- Unmappable / edge-case domains fall through to LD's catch-alls (
senses.write_in_semantic_domains,entries.unsupported_fields.semdom). Note: these are reachable via LD's CSV/DB import path but not via the/api/v1write API today.
Reverse direction — LD → DDP4 (optional, not blocking)
Only needed for a future LD → LIFT export. Two options, to decide when that work is scoped:
- (a) an approximate one-to-many map (LD key → a representative general DDP4 code); or
- (b) emit LD's 69 keys as a custom LIFT range/field and skip the reverse map entirely — lossless, but LIFT consumers then treat them as a parallel taxonomy rather than SemDom.
Because (b) is viable, this issue does not depend on building the reverse map.
Approach
- Walk the ~1,792 DDP4 codes; assign each to the nearest LD top-two-level key (largely mechanical by shared numeric prefix).
- Hand-review the tail where LD's simplification doesn't cleanly nest under DDP4's numbering.
- Spot-check a sample against LD's
semantic-domains.tsdisplay names.
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.
Assessment
This issue has not been assessed yet.