Semantic rules
From UNL Wiki
(Difference between revisions)
(New page: '''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...) |
|||
Line 2: | Line 2: | ||
== Relation Rules == | == Relation Rules == | ||
− | Relation rules are used for translating UNL relations into natural language syntactic structures. They | + | 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 head of the syntactic relation 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. | ||
+ | |||
+ | === Templates === | ||
+ | |||
+ | {| border="1" cellpadding="5" | ||
+ | !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) inside the noun phrase | ||
+ | |- | ||
+ | |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) | ||
+ | |} | ||
== Attribute Rules == | == Attribute Rules == |
Revision as of 15:35, 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.
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 head of the syntactic relation 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.
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) inside the noun phrase |
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) |
Attribute Rules
Attribute rules are used for translating UNL attributes into natural language morpho-syntactic structures. Depending on their nature, they can follow either the s-rule or the m-rule type.
- m-rule
- m-rules are used when the attribute implies a morphological or an orthographical change. There are attributes, such as .@pl (= plural) and .@past (= past), that can be directly associated to inflections.