See also context-free grammar, and context-sensitive grammar.
There can be situations where more than one of these is present.
For a fairly complete and quite entertaining treatment of anaphora, see Hirst, G. Anaphora in Natural Language Understanding: A Survey Springer Lecture Notes in Computer Science 119, Berlin: Springer, 1981.
In Prolog, we would write something like:
s(P1, P3, Agr) :- np(P1, P2, Agr), vp(P2, P3, Agr).Actually, this is too tough - the agr feature of a VP, in particular, is usually fairly ambiguous - for example the verb "love" (and so any VP of which it is the main verb) has agr=[1s,2s,1p,2p,3p], and we would want it to agree with the NP "we" which has agr=[1p]. This can be achieved by computing the intersection of the agr of the NP and the VP and setting the agr of the S to be this intersection, provided it is non-empty. If it is empty, then the S goal should not succeed.
s(P1, P3, SAgr) :-where intersection computes the intersection of two lists (regarded as sets) and binds the third argument to this intersection, and nonempty succeeds if its argument is not the empty list.
np(P1, P2, NPAgr),
vp(P1, P2, VPAgr),
intersection(NPAgr, VPAgr, SAgr),
nonempty(SAgr).
Augmented grammar rules are also used to record sem and var features in computing logical forms, and to express the relationship between the sem and var of the left-hand side and the sem(s) and var(s) of the right-hand side. For example, for the rule vp → v (i.e. an intransitive verb), the augmented rule with sem feature could be:
vp(sem(lambda(X, ?semv(?varv, X))), var(?varv)) →
v(subcat(none), sem(?semv), var(?varv))
where subcat none indicates that this only works with an intransitive verb.
Auxiliary | Example |
do/does/did | I did read |
have/has/had/having | He has read |
be/am/are/is/was/were/been/being | He is reading |
shall/will/should/would | He should read |
can, could | She can read |
may, might, must | She might read |
Complex groupings of auxiliaries can occur, as in "The child may have been being taken to the movies".
Some auxiliaries (do, be, and have) can also occur as verbs in their own right.
Auxiliary verb is often abbreviated to AUX.
AUX is a lexical grammatical category.