rule amalgam { pattern { X [form = "du", upos = "P+D"]; % match the amalgam word "du"; X -[obj.p]-> Y; % match the node linked to "du" with the `obj.p` relation } commands { add_node D :> X; % Create a new node called `D` and place it just after `X` X.form = "de"; % Change the form of `X` to `de` X.upos = ADP; % Set the `ADP` tag for the preposition "de" D.form = "le"; % Add the form feature of `D` to `le` D.upos = DET; % Set the `DET` tag for the determiner "le" add_edge Y -[det]-> D; % Add the dependency linked to the new node `D` } }