Transformation over hyper-nodes
Contents |
Changes
Hyper-nodes, as nodes, have elements, which may be altered by the use of the operators + (add) and - (delete). The operator + may be omitted. Changes affect only the scopes indicated.
- Changes to the main scope
- (%a,"a",[a],[[a]],A,(%b,"b")):=(%a,"c");(the string of the hyper-node is set to "c"; the internal node %b is not affected)
- (%a,"a",[a],[[a]],A,(%b,"b")):=(%a,"");(the string of the hyper-node is set to ""; the internal node %b is not affected)
- (%a,"a",[a],[[a]],A,(%b,"b")):=(%a,-"a");(the same as above)
- (%a,"a",[a],[[a]],A,(%b,"b")):=(%a,[c]);(the headword of the hyper-node is set to [c]; the internal node %b is not affected)
- (%a,"a",[a],[[a]],A,(%b,"b")):=(%a,[[c]]);(the UW of the hyper-node is set to [[c]]; the internal node %b is not affected)
- (%a,"a",[a],[[a]],A,^B,(%b,"b")):=(%a,+B);(add the feature B to the hyper-node %a; the internal node %b is not affected)
- (%a,"a",[a],[[a]],A,^B,(%b,"b")):=(%a,B); (the same as above: add the feature B to %a)
- (%a,"a",[a],[[a]],A,(%b,"b")):=(%a,-A);(delete the feature A from the hyper-node %a; the internal node %b is not affected)
- Changes to inner scopes
- (%a,(%b,"b",[b],[[b]],B)):=(%a,(%b,"c"));(the string of the inner node %b is set to "c"; the hyper-node %a is not affected)
- (%a,(%b,"b",[b],[[b]],B)):=(%a,(%b,""));(the string of the inner node %b is set to ""; the hyper-node %a is not affected)
- (%a,(%b,"b",[b],[[b]],B)):=(%a,(%b,-"b"));(the same as above)
- (%a,(%b,"b",[b],[[b]],B)):=(%a,(%b,[c]));(the headword of the inner node %bis set to [c]; the hyper-node %a is not affected)
- (%a,(%b,"b",[b],[[b]],B)):=(%a,(%b,[[c]]));(the UW of the inner node %b is set to [[c]]; the hyper-node %a is not affected)
- (%a,(%b,"b",[b],[[b]],B,^C)):=(%a,(%b,+C));(add the feature C to the inner node %b; the hyper-node %a is not affected)
- (%a,(%b,"b",[b],[[b]],B,^C)):=(%a,(%b,C)); (the same as above: add the feature C to %b)
- (%a,(%b,"b",[b],[[b]],B)):=(%a,(%b,-B));(delete the feature B from the inner node %b; the hyper-node %a is not affected)
- Rules must have as many parentheses as the depth of the inner scope to be altered
- (%a,(%b,(%c,(%d,(%e,"e",[e],[[e]],E))))):=(%a,(%b,(%c,(%d,(%e,"f"))))); (the string of inner node %e is set to "f"; the enclosing nodes %d, %c, %b and %a are not affected)
- Hyper-nodes do not need to be represented if the changes apply to nodes instead of nodes inside hyper-nodes
- (%a,(%b,"b",[b],[[b]],B)):=(%a,(%b,"c")); (the string of the inner node %b is set to "c"; the hyper-node %a is not affected)
could be represented simply as
- (%b,"b",[b],[[b]],B)):=(%b,"c");
if the changes apply to all nodes ("b",[b],[[b]],B) and not only to those inside scopes.
Deletion
Hyper-nodes, as any node, 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)
As any feature, inner nodes are conservative, and are not deleted even if they are not repeated (co-indexed) in the right side:
- (%a,A,^B):=(%a,+B); (the feature A is not deleted from the node %a)
- (%a,^B,(%b,"b")):=(%a,+B); (the node %b is not deleted from the hyper-node %a)
In order to delete inner nodes, the operator "-" must be used
- (%a,A,(%b,B)):=(%a,-(%b)); (the node %b is deleted from the hyper-node %a)
- (%a,A,rel(%b;%c)):=(%a,-rel(%b;%c)); (the relation rel(%b;%c) is deleted from the hyper-node %a)
Extraction
Nodes may be extracted from hyper-nodes by removing the corresponding 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.
Create
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)