KnowledgeGraph.stats()

Get summary statistics about the graph.

Usage

Source

KnowledgeGraph.stats()

Returns

dict[str, Any]
Counts of nodes (total and per type) and edges.

Examples

kg.stats()
# {"nodes": 42, "edges": 87, "documents": 10, "entities": 25, "topics": 7}