Transformation over relations

From UNL Wiki
Revision as of 18:08, 21 August 2013 by Martins (Talk | contribs)
Jump to: navigation, search

Relations and hyper-relations are altered, replaced, created and deleted by T-rules:

Altering relations

The arguments of a relation are altered

<CONDITION> := <ACTION>;


==

There are four types of S-rules:

Change
<CONDITION> := <RELATION>;
Change the attributes of the constituents of the relation. The relation itself is not affected. Features are added through "+" and deleted through "-".
  • VA(%head;%adjt):=VA(%head,+C;%adj,-D); (add the feature C to the head and remove the feature D from the adjunct)
Create
<CONDITION> := +<RELATION>;
Create a new relation. Nodes to be created must be defined as strings (between quotes) or lemmas (between brackets), if not co-indexed to an existing node.
  • VA(%head;%adjt):=+VC(%head;"c"); (add the relation VC between the head and "c", which is created.)
Delete
<CONDITION> := -<RELATION>;
Delete a relation between the head and the argument. The head and the argument are not deleted.
  • VA(%head;%adjt):=-VA(%head;%adjt); (delete the relation VA between the head and its arguments. The nodes are not deleted)
Replace
<RELATION> := <RELATION>;
Replace the relation in the left side by the one in the right side
  • VA(%head;%any):=VC(%head;%any); (replace the relation VA by VC)
Two special cases of replacement are
Merge
<RELATION><RELATION> := <RELATION>;
Replace the relations in the left side by the ones in the right side.
  • VA(%head;%adjt)VC(%head;%comp):=VB(VB(%head;%adjt);%comp); (VA and VC are deleted, and VB is created)
Divide
<RELATION> := <RELATION><RELATION>;
Replace the relation in the left side by those in the right side.
  • VA(%head;%adjt):=VC(%head;%x)VC(%head;%y); (VA is deleted, and the two VCs are created)

Where:

  • <CONDITION> (to be repeated 0 or more times) may be a tag or a <RELATION> that defines when the rule is applied. It may be empty in general cases (i.e., if the rule is always applied).
  • <RELATION> (to be repeated 1 or more times) may be:
    • a syntactic relation containing the <HEAD>, in case of head-only relations (VH, NH, JH, PH, IH, CH, AH, DH), or the <HEAD> and <ARGUMENT> (i.e, complement, adjunct or specifier), in case of binary relations (VA, VC, VS, VB, NA, NC, NS, etc).
    • a semantic relation, containing the <SOURCE> and the <TARGET>.
  • <HEAD>, <ARGUMENT>, <SOURCE> and <TARGET> may be expressed as
    • a "string" (strings come between parentheses);
    • a [lemma] (lemmas come between square brackets);
    • a feature or a set of features, separated by comma, and extracted from the UNDLF Tagset;
    • an index;
    • an action, to be performed by adding features (through "+"), deleting features (through "-"), or through the right side of an A-rule (i.e., prefixation, suffixation, infixation); or
    • a <RELATION> itself (i.e., rules may be recursive).



  • REL1(%x;%y):=REL2(%x;%y); (replacement)
  • REL(%x;%y):=; (deletion)
  • REL1(%x;%y):=+REL2(%w;%z); (creation)

Creating hyper-relations

Hyper-relations are created through encapsulating relations:

  • REL1(%x;%y)REL2(%x;%z):=REL1(REL2(%x;%z);%y); (the relation REL1 between %x and %y becomes a hyper-relation between the relation REL2(%x;%z) and the node %y.)

Transforming hyper-relations into simple relations

Hyper-relations are transformed into simple relations by removing their internal relations:

  • REL1(REL2(%x;%z);%y):=REL1(%x;%y)REL2(%x;%z); (the hyper-relation REL1 between the relation REL2(%x;%z) and the node %y is transformed into a simple relation between the nodes %x and %y; the relatin REL2(%x;%z) is not affected.)
Software