D-rule

From UNL Wiki
(Difference between revisions)
Jump to: navigation, search
(Replacement rules)
Line 1: Line 1:
'''D-rules''' (declaration rules) are used to make statements inside the UNL<sup>arium</sup> framework. They are used to assign priorities (disambiguation rules), to map attributes and relations (mapping rules) and to state identities (replacement rules).
+
'''D-rules''' (disambiguation rules) are used to prevent wrong lexical choices, to provoke best matches and to check the consistency of graphs, trees and lists. Differently from [[Grammar|T-rules]], they do not provoke transformations, but induce or block them, by assigning priorities to natural language phenomena.
  
 
== Syntax ==
 
== Syntax ==
D-rules are always composed of two fields, which are separated by "=". They are always ended by a ";".
+
D-rules follow the general syntax:
<DEFINIENDUM> = <DEFINIENS>;
+
Where:<br />
+
*<DEFINIENDUM>, the term to be defined, may be:
+
**an attribute or a value of an attribute, of UNL (@pl, @male, @future) or of NL (POS, NOU, GEN, MCL, etc);
+
**a node, to be represented as a "string" (between parentheses) or as a [lemma] (between square brackets);
+
**a relation, either syntactic or semantic (such as "agt", "obj", "VS", "XP"), with the corresponding constituents; or
+
**a sequence of attributes, nodes and relations.
+
*<DEFINIENS>, the definition, may be:
+
**an attribute or a value of an attribute, of UNL (@pl, @male, @future) or of NL (POS, NOU, GEN, MCL, etc);
+
**a node, to be represented as a "string" (between parentheses) or as a [lemma] (between square brackets);
+
**a relation, either syntactic or semantic (such as "agt", "obj", "VS", "XP"), with the corresponding constituents;
+
**a sequence of attributes, nodes and relations; or
+
**a numeric value indicating the degree of certainty, ranging from 0 (=impossible) to 255 (=necessary).
+
  
== Types of D-rule ==
+
STATEMENT=P;
There are three main types of D-rule:
+
*'''Disambiguation rules''' are used to state priorities.
+
*'''Mapping rules''' are used to state correspondences between UNL and NL.
+
*'''Replacement rules''' are used to state correspondences inside UNL or NL.
+
  
=== Disambiguation rules ===
+
Where<br />
Disambiguation rules are used to state priorities. They follow the general syntax:
+
STATEMENT is the left side (condition) of a [[L-rule]] or a [[S-rule]]; and<br />
<DEFINIENDUM> = VALUE;
+
P, which can range from 0 (impossible) to 255 (necessary), is the probability of occurrence of the STATEMENT<br />
Where <VALUE> is a numeric value that may range from 0 (impossible, or FALSE) to 255 (necessary).
+
Disambiguation rules normally apply over the left side of [[L-rule]]s and [[S-rule]]s.
+
  
==== Examples of disambiguation rules ====
+
== Examples ==
*("the",ART)("a",ART)=0; (It's not possible that the article "a" follows the article "the")  
+
*List structures
*("afraid",ADJ)(BLK)("of",PRE)=255; (It's absolutely necessary that the preposition "of" follows the adjective "afraid" after a blank space).
+
**(ART)(BLK)(VER)=0; (an article (ART) may not precede a verb (VER))
*VH(NOU)=0; (It's not possible that the head of a verbal phrase be a noun)
+
**(ART)(BLK)(NOU)=255; (articles (ART) always precede nouns (NOU))
*VH(VER)=255; (It's absolutely necessary that the head of a verbal phrase be a verb)
+
*Syntactic structures
 
+
**agt(VER;ADJ)=0; (an adjective (ADJ) may not be an agent (agt) of a verb (VER))
=== Mapping rules ===
+
**agt(VER;NOU)=255; (agents (agt) of verbs (VER) are always nouns (NOU))
Mapping rules are used to state correspondences between UNL and NL. They follow the general syntax:
+
**VS(VER;ADJ)=0; (an adjective (ADJ) may not be an specifier (VS) of a verb (VER))
<DEFINIENDUM> = <DEFINIENS>;
+
**NS(NOU;DET)=255; (determiners (DET) are always specifiers (NS) of nouns (NOU))
Where <DEFINIENDUM> is an element of UNL and <DEFINIENS> is an element of NL, or vice-versa.
+
 
+
==== Examples of mapping rules ====
+
*From UNL to NL
+
**@pl = PLR;
+
**@past = PAS;
+
**@passive = PSV;
+
**@male = MCL;
+
**@past,@progressive = PAS,PGS;
+
*From NL to UNL
+
**PLR = @pl;
+
**PAS = @past
+
**MCL = @male
+
**PAS,PGS = @past.@progressive
+
 
+
=== Replacement rules ===
+
Replacement rules are used to state correspondences inside UNL or NL. They follow the general syntax:
+
<DEFINIENDUM> = <DEFINIENS>;
+
Where <DEFINIENDUM> and <DEFINIENS> are both elements of UNL, or are both elements of NL.<br />
+
Replacement rules are mainly used to avoid redundancy and unnecessary proliferation of rules.
+
 
+
==== Examples of replacement rules ====
+
*Inside UNL
+
**@dual = @pl; (replace the attribute @dual by the attribute @pl)
+
*Inside NL
+
**DUA = PLR; (replace the attribute DUA by the attribute PLR)
+

Revision as of 09:23, 27 March 2010

D-rules (disambiguation rules) are used to prevent wrong lexical choices, to provoke best matches and to check the consistency of graphs, trees and lists. Differently from T-rules, they do not provoke transformations, but induce or block them, by assigning priorities to natural language phenomena.

Syntax

D-rules follow the general syntax:

STATEMENT=P;

Where
STATEMENT is the left side (condition) of a L-rule or a S-rule; and
P, which can range from 0 (impossible) to 255 (necessary), is the probability of occurrence of the STATEMENT

Examples

  • List structures
    • (ART)(BLK)(VER)=0; (an article (ART) may not precede a verb (VER))
    • (ART)(BLK)(NOU)=255; (articles (ART) always precede nouns (NOU))
  • Syntactic structures
    • agt(VER;ADJ)=0; (an adjective (ADJ) may not be an agent (agt) of a verb (VER))
    • agt(VER;NOU)=255; (agents (agt) of verbs (VER) are always nouns (NOU))
    • VS(VER;ADJ)=0; (an adjective (ADJ) may not be an specifier (VS) of a verb (VER))
    • NS(NOU;DET)=255; (determiners (DET) are always specifiers (NS) of nouns (NOU))
Software