English grammar/Determiners
(→two books =) |
|||
Line 27: | Line 27: | ||
The single rule (D,att,%x)(NB,%y):=(%y,+att=%x); will apply for all the determiners having the feature "att", i.e., [a], [an], [this], [that], [same], [other] etc. | The single rule (D,att,%x)(NB,%y):=(%y,+att=%x); will apply for all the determiners having the feature "att", i.e., [a], [an], [this], [that], [same], [other] etc. | ||
− | == two books | + | == two books == |
Numbers are not represented as attributes, but as relations. In this case, we cannot avoid some syntactic processing. The rule for dealing with cardinals is the following: | Numbers are not represented as attributes, but as relations. In this case, we cannot avoid some syntactic processing. The rule for dealing with cardinals is the following: | ||
− | ;(DIGIT,^ORD,%y)(NB,%x):=(XB(%x;%y,+spec,+qua),+LEX=N,+XB=NB,%z); two books > XB(books,two) | + | ;<nowiki>(DIGIT,^ORD,%y)(NB,%x):=(XB(%x;%y,+spec,+qua),+LEX=N,+XB=NB,%z);</nowiki> two books > XB(books,two) |
This rules states that, if there is a digit, which is not ordinal, before an intermediate projection of the noun phrase (NB), then we should create another intermediate projection XB between the NB and the digit, i.e.: | This rules states that, if there is a digit, which is not ordinal, before an intermediate projection of the noun phrase (NB), then we should create another intermediate projection XB between the NB and the digit, i.e.: | ||
<pre> | <pre> |
Revision as of 10:51, 2 August 2012
Articles ("a", "the"), demonstrative determiners ("this", "that", "same" etc.), interrogative determiners ("which", "what") and quantifiers ("all", "any" etc.) are represented in UNL as attributes: "the book" > book.@def, "this book" > book.@proximal, "all books" > book.@all, "which book" > book.@wh. Numbers are represented by the relation "qua": "two books" > qua(book,2), "second book" > qua(book,2.@ordinal). Possessive determiners ("my", "your" etc) and possessive pronouns ("mine", "yours" are represented by the relation "pos" and the personal pro-forms of UNL (00.@1, 00.@2 and 00.@3): "my book" > pos(book,00.@1), "book of mine" > pos(book,00.@1).
UNLization
There are basically two types of UNLization rules dealing with determiners: attribute rules and relation rules. Attribute rules normally make use of the attribute "att" and its corresponding features assigned in the dictionary.
the book
INPUT (ENG): the book OUTPUT (UNL): book.@def DICTIONARY:
- [the]{}"" (LEX=D,POS=ART,att=@def)<eng,255,0>;
- [book]{}"book" (LEX=N,POS=NOU,NUM=SNG)<eng,0,0>;
- [ ]{}""(BLK)<eng,0,0>;
T-GRAMMAR:
- (D,att,%x)(N,%y):=(%y,+att=%x);
- (BLK):=;
D-GRAMMAR: not necessary
TRACE:
INPUT: the book
STATE#1: [the][ ][book] (tokenization)
STATE#2: [the][book] (blank space is deleted)
STATE#3: [book.@def] ("the" is deleted and its attribute is copied to "book"]
OUTPUT: book.@def
Note that Rule#1 will delete the determiner because its node (%x) is not reproduced in the right side of the rule. In list rules, nodes that do not appear in the right side are deleted. The feature "+att=%x" creates an attribute "att" and assigns the value of the same attribute in %x in to it. Note that [book] has no "att" in the dictionary, but [the] does. The feature "+att=%x" creates the attribute for [book] and assigns the value of [the], which is %x, to it. This kind of rule will only work if %x has "att"; if not, the attribute "att" will be created, but without any value.
In the English grammar, the rule is actually:
- (D,att,%x)(NB,%y):=(%y,+att=%x);
Note that %y has the feature NB instead of N. The reason for this is that, in English, there can be other words between the determiner and the noun: "a beautiful book", for instance. And it's important to assign the value of the determiner to the head of the noun phrase (which is "book", and not "beautiful"). In that case, we first process the noun phrase, generating all its intermediate projections (NB's). Only then we resolve the determiners.
The single rule (D,att,%x)(NB,%y):=(%y,+att=%x); will apply for all the determiners having the feature "att", i.e., [a], [an], [this], [that], [same], [other] etc.
two books
Numbers are not represented as attributes, but as relations. In this case, we cannot avoid some syntactic processing. The rule for dealing with cardinals is the following:
- (DIGIT,^ORD,%y)(NB,%x):=(XB(%x;%y,+spec,+qua),+LEX=N,+XB=NB,%z); two books > XB(books,two)
This rules states that, if there is a digit, which is not ordinal, before an intermediate projection of the noun phrase (NB), then we should create another intermediate projection XB between the NB and the digit, i.e.:
two books will be analyzed as: XB / \ NB two | books
Note that we are not only converting a list: [two][books] into a relation: XB(books;two). We are actually creating a hyper-node which contains this relation. Compare:
- (%x)(%y):=XB(%y;%x); transforms a list into a relation
- (%x)(%y):=(XB(%y;%x),%z); replaces two nodes (%x and %y) by a third node (%z) and creates an XB relation between %x and %y inside this node.
Why is this necessary
d
Note that this is done inside a node
- Ordinals (ORD)
(DIGIT,ORD,%y)(NB,%x):=(XB(%x;%y,+spec,+mod),+LEX=N,+XB=NB,%z); first book > XB(book,first)
- Quantifiers (DIGIT)
- Posessive determiners (POD)
(POD,%x)(NB,%y):=(XP(%y;%x,+spec,+pos),+LEX=N,+XP=NP,%z); my book > XP(book,I)
- Possessive pronouns (SPR)
(N,%x)([of])(SPR,%y):=(XB(%x;%y,+spec,+pos),+LEX=N,+XB=NB,%z); book of mine > XP(book,I)
- Genitive (GNT)
(N,%x)(PTC,GNT)(N,%y):=(XB(%y;%x,+spec,+pos),+LEX=N,+XB=NB,%z); John's book > XB(book,John)
- Indefinite pronouns (NPR)
(NPR,%x)([of])(NP,%y):=(XB(%y;%x,+spec,+qua),+LEX=N,+XB=NB,%z); none of them > XB(them, none)
- Interrogative determiners
([whose],%x)(N,%y):=(XB(%y;%x,+spec,+pos),+LEX=N,+XB=NB,%z);