Skip to main content

Module document_graph

Module document_graph 

Source
Expand description

Semantic Document Graph

Graph structure for document relationships based on semantic similarity. Nodes represent documents with embeddings; edges encode similarity, citation, or cluster-membership relationships.

Structs§

DocGraphEdge
A directed edge in the semantic document graph.
DocGraphNode
A node in the semantic document graph.
DocumentGraphStats
Summary statistics for the graph.
SemanticDocumentGraph
Graph of document relationships based on semantic similarity and explicit annotations (citations, cluster membership).

Enums§

EdgeKind
Kind of relationship between two documents.

Functions§

cosine_sim
Cosine similarity between two vectors. Returns 0.0 when either vector has zero magnitude or the lengths differ.