Skip to main content

Module graph

Module graph 

Source
Expand description

Graph service for high-level knowledge graph operations.

Provides a service layer wrapping GraphBackend with business logic, entity deduplication, and relationship inference.

§Example

use subcog::services::GraphService;
use subcog::storage::graph::SqliteGraphBackend;
use subcog::models::graph::{Entity, EntityType, EntityQuery};

let backend = SqliteGraphBackend::new("graph.db")?;
let service = GraphService::new(backend);

// Store an entity
let entity = Entity::new(EntityType::Person, "Alice", Domain::for_user());
service.store_entity(&entity)?;

// Query entities
let people = service.find_by_type(EntityType::Person, 10)?;

Structs§

GraphService
High-level service for knowledge graph operations.

Functions§

name_similarity 🔒
Simple name similarity using Jaccard index on character bigrams.