-
Notifications
You must be signed in to change notification settings - Fork 0
2. Type Feature Structure
However, the first grammar we just wrote is a bit redundant. The type feature structure of that grammar can be massively simplified by inheritance.
bot sub [cat, agr, person].
cat sub [agreeable, s].
agreeable sub [pn, v] intro [agr:agr].
agr intro [person:person].
person sub [first, second, third].By making pn and v children of a new subcategory agreeable and
introducing a feature agr (short for agreement) with the type agr,
pn and v will also have the agr feature.
Notes:
- The indentation is for styling purposes only.
- Since there may be more than one type of agreement, it is the
convention to have one more layer of the
agrfeature.
Using the new type feature structure, the rules can also be massively simplified. We only need one rule right now!
bot sub [cat, agr, person].
cat sub [agreeable, s].
agreeable sub [pn, v] intro [agr:agr].
agr intro [person:person].
person sub [first, second, third].
i ---> (pn, agr:person:first).
you ---> (pn, agr:person:second).
he ---> (pn, agr:person:third).
she ---> (pn, agr:person:third).
sleep ---> (v, agr:person:first).
sleep ---> (v, agr:person:second).
sleeps ---> (v, agr:person:third).
intransitive rule
s ===>
cat> (pn, agr:Agr),
cat> (v, agr:Agr).TRALE follows the prolog convention that expressions that start with a
capital letter are variables. The statement below means the agr
feature of the proper noun can be unified with the agr feature of
the verb. In another word, both agrs of the proper noun and the verb
should be the same, which is exactly what we want!
cat> (pn, agr:Agr),
cat> (v, agr:Agr).