next up previous contents
Next: Feature Matching Up: The definition of a Previous: Structural Matching

   
Output Generation

Although nothing has yet been said about the feature equations (see the next subsection), we assume that only matches that meet the additional constraints imposed by feature equations are considered for output. If no structural match survives feature equations checking, that matching has failed. If the process of matching lhs to inp fails, there are two alternative behaviors according to the value of a parameter27.6. If the parameter is set to ``false'', which is the default value, no output is generated. On the other hand, if it is set to ``true'', then the own inp tree is copied to the output27.7. If the process of matching succeeds, as many trees will be generated in the output as the number of possible matches obtained in the process. For a given match, the output tree is generated by substituting the occurrences of variables in the rhs tree of the metarule by the material to which they have been instantiated in the match. In the case of typed-variables, the name of the variable is just substituted by the name of the node to which it has been instantiated from inp. An important detail is how the markers (foot, substitution, head, NA) are set in the output tree node. The rule is that, if the occurrence of the variable at the rhs tree has any marker, then the generated node will inherit ALL markers from the rhs node. If it has no marker, then all the markers at the generated node will come from inp. The exception to the rule is that if the generated node has any children, then it will not be marked substitution, foot, or anchor, despite what the previous rule say. The case of non-typed variables, not surpringly, is not so simple. In the output tree, this node will be substituted by the subtree list that was associated to this variable, in the same order, attaching to the parent of this non-typed variable node. But remember that some subtrees may have been removed from some of the trees in this list (maybe entire elements of this list) due to the effect of the children of the metavariable in lhs. It is a requirement that any occurence of a non-typed variable node at the rhs tree has exactly the same number of children as the unique occurence of this non-typed variable node in lhs. Hence, when generating the output tree, the subtrees at rhs will be inserted exactly at the points where subtrees were removed during matching, in a positional, one to one correspondance. If one wants any of these cutting points to be left empty, as if the subtree has been removed at the substitution points, the corresponding children at the rhs tree have to be labeled EMPTY.
next up previous contents
Next: Feature Matching Up: The definition of a Previous: Structural Matching
XTAG Project
http://www.cis.upenn.edu/~xtag