Expand description
Knowledge graph implementation for per-role semantic search.
Each RoleGraph is a directed graph of Nodes (concepts) and Edges
(co-occurrence relationships) built from indexed documents. An Aho-Corasick
automaton provides O(n) concept detection over document text.
§Architecture
Thesaurus (JSON)
|
v
TriggerIndex (Aho-Corasick patterns)
|
v
RoleGraph (nodes + edges + document map)
|
v
Ranked search results§Key Types
RoleGraph– the main graph structure; useRoleGraph::newfor async initTriggerIndex– compiled Aho-Corasick automaton over thesaurus terms
Modules§
Structs§
- Graph
Stats - Statistics about the graph structure for debugging
- Role
Graph - A
RoleGraphis a graph of concepts and their relationships. - Role
Graph Sync - Wraps the
RoleGraphfor ingesting documents and isSendandSync - Serializable
Role Graph - A serializable representation of RoleGraph for JSON serialization/deserialization.
- Trigger
Index - TriggerIndex is canonically implemented in
terraphim_rolegraph_core(issue terraphim-core#33). This re-export keeps the historical public path stable; both paths now share one implementation and one golden corpus (conformance/trigger_index_golden.json). A TF-IDF trigger index over arbitrary string descriptions.
Enums§
- Error
- Errors produced by the role-graph knowledge graph operations.
Constants§
- DEFAULT_
TRIGGER_ THRESHOLD - TriggerIndex is canonically implemented in
terraphim_rolegraph_core(issue terraphim-core#33). This re-export keeps the historical public path stable; both paths now share one implementation and one golden corpus (conformance/trigger_index_golden.json). Default relevance threshold. Matches upstreamterraphim_rolegraph.
Functions§
- checked_
magic_ pair - Pair graph coordinates without overflowing the edge identity.
- magic_
pair - Magic pair - Cantor pairing function for edge IDs
- magic_
unpair - Magic unpair - inverse of Cantor pairing
- split_
paragraphs - Splits a block of text into individual sentences and clause fragments.