KnowledgeGraph.add_node()

Add a node to the graph, or update it if the ID already exists.

Usage

Source

KnowledgeGraph.add_node(node)

Parameters

node: Node
The node to add or update.

Examples

kg.add_node(tb.Node(
    id="topic-ml",
    node_type=tb.NodeType.TOPIC,
    name="Machine Learning",
))