Version 1 (modified by 16 years ago) (diff) | ,
---|
Action
An action (or action list) follows the template specification in the rule.
An action is basically a function taking arbitrary number of arguments named accordingly to the token indices, starting with 0.
Currently, there are following actions implemented:
MARK
This action is used for marking a token segment. It is used in two cases:- Adding a phrasal element: in this case, the last argument must be the name of the new phrase.
Example:MARK 0 2 4 <coord>
-- marks a coordination on tokens with indices 0, 2 and 4. - Marking a single element: in this case, this element is then assigned a dependency using the
DEP
action (see below).
- Adding a phrasal element: in this case, the last argument must be the name of the new phrase.
AGREE
This action is used for testing grammatical agreement. It takes 3 arguments, the first two are the token indices, the third describes the morphological tags to be tested -g
for the gender,n
for the number andc
for the case.
Example:AGREE 0 2 gnc
-- tests a case-number-gender agreement on tokens with indices 0 and 2.
DEP
This action marks a dependency on a result of theMARK
action. It takes a single argument describing the token index to depend on.
PROB
This action assigns a probability ranking to the rule. It takes a single argument -- the probability.
HEAD
This action marks the head of a phrasal element created by theMARK
action. It takes a single argument -- the token index to be marked as the head.
IMPORTANT
This action marks an arbitrary number of token indices (which are taken as arguments) as "important" which can be used for further ranking.