Semantic rules
(→Attribute Rules) |
|||
Line 47: | Line 47: | ||
ATTRIBUTE := FEATURE; | ATTRIBUTE := FEATURE; | ||
To be used when the attribute is equivalent to an existing natural language feature | To be used when the attribute is equivalent to an existing natural language feature | ||
− | ;@pl := PLR; | + | ;<nowiki>@pl := PLR;</nowiki> |
:the attribute .@pl, which stands for plural, is directly equivalent to the tag "PLR" | :the attribute .@pl, which stands for plural, is directly equivalent to the tag "PLR" | ||
− | ;@past := ET0; | + | ;<nowiki>@past := ET0;</nowiki> |
:the attribute .@past, which stands for past, is directly equivalent to the tag "ET0" | :the attribute .@past, which stands for past, is directly equivalent to the tag "ET0" | ||
Line 57: | Line 57: | ||
ATTRIBUTE := DELETE : ADD; (REPLACEMENT) | ATTRIBUTE := DELETE : ADD; (REPLACEMENT) | ||
To be used when the attribute cannot be associated to an existing tag and implies a morphological or orthographical change | To be used when the attribute cannot be associated to an existing tag and implies a morphological or orthographical change | ||
− | ;@interrogative := 0 > "?"; | + | ;<nowiki>@interrogative := 0 > "?";</nowiki> |
:the attribute .@interrogative implies the generation of a question mark "?" at the end of the sentence | :the attribute .@interrogative implies the generation of a question mark "?" at the end of the sentence | ||
− | :@square_bracket := "[" < 0, 0 > "]"; | + | :<nowiki>@square_bracket := "[" < 0, 0 > "]";</nowiki> |
:the attribute .@square_bracket implies the generation of an opening bracket in the beginning of the sentence, and of a closing bracket in the end of the sentence | :the attribute .@square_bracket implies the generation of an opening bracket in the beginning of the sentence, and of a closing bracket in the end of the sentence | ||
Line 65: | Line 65: | ||
ATTRIBUTE := SYNTATIC RELATION; | ATTRIBUTE := SYNTATIC RELATION; | ||
To be used when the attribute cannot be associated to an existing tag and implies a change in the syntactic structure of the sentence (i.e., the insertion of a word) | To be used when the attribute cannot be associated to an existing tag and implies a change in the syntactic structure of the sentence (i.e., the insertion of a word) | ||
− | ;@def := NS(DP([the])); | + | ;<nowiki>@def := NS(DP([the]));</nowiki> |
:the attribute .@def implies the generation of a definite article in the position of the specifier of the noun | :the attribute .@def implies the generation of a definite article in the position of the specifier of the noun |
Revision as of 15:55, 16 October 2009
Semantic rules are rules for mapping UNL structures into natural language and vice-versa. They can be of two different types: relation rules, i.e., rules that map UNL relations into syntatic structures; and attribute rules, which are rules that map UNL attributes into morpho-syntactic structures.
Contents |
Relation Rules
Relation rules are used for translating UNL relations into natural language syntactic structures. They form a special case of the S-Rule type, because:
- differently from other s-rules, the heads of the syntactic relations may not be simplified; and
- differently from other s-rules, both arguments of the syntactic relation must be coindexed to the arguments of the semantic relation through the placeholders %01 and %02, which stand for the left and the right argument [of the semantic relation], respectively.
Templates
CASE | TEMPLATE* | EXAMPLE | GLOSS |
---|---|---|---|
ADJUNCT (DIRECT) | XA(%01:%02); | mod(NOU;ADJ):=NA(%01:%02); | if "mod(NOU;ADJ)" then the ADJ (%02) is a direct adjunct to the NOU (%01) |
ADJUNCT (INDIRECT) | XA(%01:YC(Y:%02)); | tim(VER;NOU):=VA(%01:PC([in]:%02)); | if "tim(VER;NOU)" then the NOU (%02) is the complement of the preposition "in" which is the head of the prepositional phrase adjunct to the VER (%01) |
COMPLEMENT (DIRECT) | XC(%01:%02) | obj(VER;NOU):=VC(%01:%02); | if "mod(VER;NOU)" then the NOU (%02) is the direct complement of the VER (%01) |
COMPLEMENT (INDIRECT) | XC(%01:YC(Y:%02)); | gol(VER;NOU):=VC(%01:PC([to]:%02)); | if "gol(VER;NOU)" then the NOU (%02) is the complement of the preposition "to" which is the head of the prepositional phrase complement to the VER (%01) |
SPECIFIER | XS(%01:%02) | agt(VER;NOU):=VS(%01:%02); | if "agt(VER;NOU)" then the NOU (%02) is the specifier of the VER (%01) |
*X and Y must be replaced by lexical categories (N,A,J,V,P,C,D,I), depending on the nature of the heads.
Attribute Rules
Attribute rules are used for translating UNL attributes into natural language morpho-syntactic structures. They can be of three different types:
Feature assignment
ATTRIBUTE := FEATURE;
To be used when the attribute is equivalent to an existing natural language feature
- @pl := PLR;
- the attribute .@pl, which stands for plural, is directly equivalent to the tag "PLR"
- @past := ET0;
- the attribute .@past, which stands for past, is directly equivalent to the tag "ET0"
m-rule
ATTRIBUTE := ADD < DELETE; (PREFIXATION) ATTRIBUTE := DELETE > ADD; (SUFFIXATION) ATTRIBUTE := DELETE : ADD; (REPLACEMENT)
To be used when the attribute cannot be associated to an existing tag and implies a morphological or orthographical change
- @interrogative := 0 > "?";
- the attribute .@interrogative implies the generation of a question mark "?" at the end of the sentence
- @square_bracket := "[" < 0, 0 > "]";
- the attribute .@square_bracket implies the generation of an opening bracket in the beginning of the sentence, and of a closing bracket in the end of the sentence
s-rule
ATTRIBUTE := SYNTATIC RELATION;
To be used when the attribute cannot be associated to an existing tag and implies a change in the syntactic structure of the sentence (i.e., the insertion of a word)
- @def := NS(DP([the]));
- the attribute .@def implies the generation of a definite article in the position of the specifier of the noun