Skip to content

Latest commit

 

History

History
89 lines (55 loc) · 2.26 KB

graph.rst

File metadata and controls

89 lines (55 loc) · 2.26 KB

Graph Builder

This package provides are two type of graphs — the standard graph and the vis.js graph — for E-HowNet definitions.

Standard Graph

Generates graphs from E-HowNet definitions.

See also: ehn.graph.standard.EhnStandardGraphBuilder

__call__(root)

param ~ehn.parse.node.base.EhnParseNode root

The root parse node of a E-HowNet definition.

rtype

~ehn.graph.standard.EhnStandardGraph

See also: ehn.graph.standard.EhnStandardGraph

nodes

A dictionary that maps the node ID (a random UUID or a coindex) to a list of parse nodes.

edges

A list of triplets (subject node ID, predicate node ID, object node ID). The IDs are the keys in nodes.

functions

A list of pairs (function node ID, argument node ID). The IDs are the keys in nodes. Note that different argument of a single function node will be listed separately.

restrictions

A list of pairs (placeholder node ID, restriction node ID). The IDs are the keys in nodes.

root_id

The ID of the root node in the definition.

Vis Graph

Generates graphs from E-HowNet definitions for vis.js.

See also: ehn.graph.standard.EhnVisGraphBuilder

param set definite_labels

a set of the labels of the definite concepts.

__call__(root)

param ~ehn.parse.node.base.EhnParseNode root

The root parse node of a E-HowNet definition.

rtype

~ehn.graph.standard.EhnVisGraph

Please refers vis.js's documentation.

See also: ehn.graph.standard.EhnVisGraph

nodes

The nodes.

edges

The edges