Skip to main content

Crate terraphim_rolegraph

Crate terraphim_rolegraph 

Source
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

Modules§

input

Structs§

GraphStats
Statistics about the graph structure for debugging
RoleGraph
A RoleGraph is a graph of concepts and their relationships.
RoleGraphSync
Wraps the RoleGraph for ingesting documents and is Send and Sync
SerializableRoleGraph
A serializable representation of RoleGraph for JSON serialization/deserialization.
TriggerIndex
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 upstream terraphim_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.