KnowledgeGraph.add_edge()

Add an edge to the graph, or update it if the key already exists.

Usage

Source

KnowledgeGraph.add_edge(edge)

Parameters

edge: Edge
The edge to add or update. The (source, target, relation) triple is the primary key.

Raises

KeyError
If source or target node does not exist.