Commit 056b0cc
feat: add medical extensions (MedicalRoleGraph, symbolic embeddings, SNOMED/UMLS extractors)
Adds medical domain support behind `medical` feature flags across three crates:
**terraphim_types**: MedicalNodeType (27 variants), MedicalEdgeType (65 variants)
**terraphim_rolegraph**: MedicalRoleGraph with IS-A hierarchy, adjacency index, symbolic embeddings (Jaccard + path distance)
**terraphim_automata**: EntityExtractor (SNOMED), UmlsExtractor, ShardedUmlsExtractor with daachorse sharded automaton, bincode+zstd artifact serialization
Key fixes:
- magic_unpair f32->f64 for SNOMED IDs (100M-900M range)
- Overlap detection: start < m.span.1 && end > m.span.0
- Multi-CUI term preservation in ShardedUmlsExtractor
- Adjacency index for O(degree) edge lookups
- Clippy: derive(Default) and is_some_and
78 rolegraph tests + 41 automata tests, all passing.
E2E verified in medgemma-competition (49/49 checks pass).
Closes #549
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 0b9b211 commit 056b0cc
60 files changed
Lines changed: 11254 additions & 573 deletions
File tree
- .beads
- crates
- terraphim_agent
- src
- tests
- terraphim_automata
- src
- terraphim_multi_agent
- src
- agents
- workflows
- terraphim_rolegraph
- examples
- src
- terraphim_tinyclaw
- docs
- examples
- src
- agent
- channels
- skills
- tests
- terraphim_types
- examples
- src
- docs
- plans
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
0 commit comments