Deep learning basics of natural language processing (graph theory)

Deep learning natural language processing basics

NLP pre-foundation (graph theory)

Undirected graph

Undirected graph G can be defined as a two-tuple G=(N, E), where N is a non-empty finite set of vertices; E is a finite set of edges.
G=(N,E)
N={V1,V2,V3,V4,V5,V6}
E={(V1,V2),(V1,V3),(V1,V4),(V2,V5),( V3,V4),(V3,V5),(V3,V6),(V4,V6),(V5,V6))
Undirected graph

Directed graph

A directed graph D can be defined as a two-tuple D=(N,E), where N is a non-empty finite set of vertices, and E is a finite set of edges.
D=(N,E)
N={V1,V2,V3,V4,V5,V6}
E={(V1,V2),(V1,V5),...,(V5,V3),(V5,V6) }
Directed graph

Connected graph

A connected graph is an undirected graph G=(N,E) or a directed graph D=(N,E). For any two vertices in N, there is a sequence of vertices P, (the connection visible to the naked eye), then P is also referred to as a D or G of FIG path or passage .

- loop
beginning and terminating at a common vertex passage called loop (from circuit) (not frequent); if no drawing loop graph called the loop-FIG .
Connected graph

tree

- tree : a loop-free directed graph is called forest ; a loop-free communication is referred to FIG tree (tree free).
If a node in the tree is specially marked as the root node, then this tree is called the root tree .
- tree comprising n nodes finite set S (n> 0), and a relationship is defined in the R S, R satisfies the following three conditions:
(1) one and only one node t₀∈S, the A node has no predecessor for R, and the node t₀ is called the root;
(2) Except for the node t₀, each node in S has and only one direct predecessor for R;
(3) For any node t∈S except the node, there is a node sequence t₀, t₁,...,tk, so that t₀ is the root of the tree, tk=t, and the ordered pair <ti-1,ti>∈R( 1≤i≤k), then the node sequence is called a path from the root node t₀ to the node t.
-In the root tree, the top-down path end node is called the leaf node of the tree, and the node between the root node and the leaf node is called the intermediate node (or inner node).

Guess you like

Origin blog.csdn.net/weixin_45480242/article/details/108726281