Transformation over hyper-nodes

From UNL Wiki
Revision as of 15:46, 21 August 2013 by Martins (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Altering hyper-nodes

Hyper-nodes, as nodes, have features, which may be altered by the use of the operators + (add) and - (delete). Changes in the hyper-node do not affect the internal nodes and relations. The operator + may be omitted.

  • (REL(%x;%y),%z):=(%z,+B); (add the feature B to the hyper-node %z; the internal nodes %x and %y are not affected)
  • (REL(%x;%y),%z):=(%z,+B); (the same as above: add the feature B to %x)
  • (REL(%x;%y),%z,A):=(%z,-A);(delete the feature A from the hyper-node %z; the internal nodes %x and %y are not affected)

Deleting hyper-nodes

In LL and LT rules, hyper-nodes are deleted if they are not repeated (co-indexed) in the right side. In this case, all the inner nodes are deleted as well:

  • (REL(%x;%y),%z):=; (the hyper-node %z will be deleted, and all its internal nodes and relations as well)

In order to preserve the internal nodes, see Extarcting nodes out of hyper-nodes below

Creating hyper-nodes

Hyper-nodes are created through the encapsulation of existing nodes

  • (%x):=((%x),%y); (the hyper-node %y is created, with the node %x there inside)
  • REL(%x;%y):=(REL(%x;%y),%z); (the hyper-node %z is created, with the relation REL between the nodes %x and %y inside)
  • (%x)(%y):=((%x)(%y),%z); (the hyper-node %z is created, with the linear relation between the nodes %x and %y there inside)
Attention
relations and nodes must be repeated in the right side or they will be deleted
  • (%x):=(%y); (the node %x will be simply replaced by %y; no hyper-node will be created)
  • REL(%x;%y):=(%z); (the relation REL between the nodes %x and %y will be replaced by the node %z; no hyper-node will be created)

Extracting nodes out of hyper-nodes

Nodes may be extracted from hyper-nodes by removing the hyper-node parentheses. In this case, the hyper-node is deleted (along with its features), but the internal nodes and relations are preserved, if repeated on the right side.

  • ((%x),%y):=(%x); (the hyper-node %y is deleted, but its internal node %x is preserved; in case %y have nodes other than %x, these nodes will be deleted as well, because they are not repeated in the right side)
  • (REL(%x;%y),%z):=REL(%x;%y); (the hyper-node %z is deleted, but its internal relation REL(%x;%y) is preserved; in case %z have relations other than REL(%x;%y), and nodes other than %x and %y, these will be deleted as well, because they are not repeated in the right side.
Software