Skip to content

feat: model parity with glossarist-ruby and domain graph support#21

Merged
ronaldtse merged 2 commits into
mainfrom
feat/model-parity-with-glossarist
May 14, 2026
Merged

feat: model parity with glossarist-ruby and domain graph support#21
ronaldtse merged 2 commits into
mainfrom
feat/model-parity-with-glossarist

Conversation

@ronaldtse
Copy link
Copy Markdown
Member

Summary

Updates the vocabulary browser to use the new glossarist model structure from glossarist-ruby/glossarist-js, and adds domain edge support for the graph visualization.

Changes

Model parity

  • Designation type: Replaced flat gl:gender/gl:plurality with structured gl:grammarInfo array (matching glossarist-js GrammarInfo model)
  • Full designation attributes: Added termType, absent, geographicalArea, prefix, usageInfo, fieldOfApplication, acronym/initialism/truncation, text, image
  • LocalizedConcept: Added classification, reviewType, script, system, lineageSourceSimilarity fields
  • generate-data.mjs: Updated termToDesignation to map grammar_info from YAML to structured JSON-LD, handle all designation subtypes (letter_symbol, graphical symbol)
  • LanguageDetail.vue: Renders grammarInfo (gender, number) and termType badges
  • TBX export: Emits grammaticalGender/Number from grammarInfo objects

Domain graph support

  • build-edges.js: Extracts domain edges and generates domain-nodes.json with concept counts
  • DatasetAdapter: Added extractDomainEdges and loadDomainNodes methods
  • GraphEngine: Handles domain node type, per-lang edge dedup
  • GraphPanel: Renders domain nodes as purple rounded rectangles with labels
  • ConceptDetail.vue: Shows domain section with language coverage
  • vocabulary store: Loads domain nodes alongside graph edges

Type updates

  • Designation interface with GrammarInfo, all new optional fields
  • LocalizedConcept with classification, reviewType, script, system
  • release type changed from number to string (matches glossarist-ruby)
  • Added EDGE_TYPE constant, GraphEdge.lang, GraphNode.nodeType

Testing

  • All 384 tests pass
  • TypeScript compilation clean
  • Backward compatible — old data without grammarInfo still renders correctly

ronaldtse added 2 commits May 15, 2026 07:12
- Add domain extraction to build-edges.js with domain-nodes.json output
- Add extractDomainEdges to DatasetAdapter for runtime domain detection
- Update GraphEngine with domain node type and per-lang edge dedup
- Update GraphPanel with domain node rendering (rounded rect, purple)
- Add domain display section to ConceptDetail.vue
- Update vocabulary store to load domain nodes alongside edges
- Add EDGE_TYPE constant and GraphEdge.lang field to types
- Update test helpers and add domain/edge tests
- Replace flat gender/plurality with structured grammarInfo in
  Designation type and generate-data termToDesignation
- Add full designation attributes: termType, absent, geographicalArea,
  prefix, usageInfo, fieldOfApplication, acronym/initialism/truncation,
  text, image
- Add LocalizedConcept fields: classification, reviewType, script,
  system, lineageSourceSimilarity
- Update LanguageDetail.vue to render grammarInfo and termType
- Update TBX export to emit grammar info from grammarInfo objects
- Fix release type from number to string in timeline test
- Update language-detail test for grammarInfo structure
@ronaldtse ronaldtse merged commit f043c06 into main May 14, 2026
4 checks passed
@ronaldtse ronaldtse deleted the feat/model-parity-with-glossarist branch May 14, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant