- Up - | Next >> |
Here is a tiny grammar that generates the sentence the gangster dies.
Assume we want to extend it, so that it can also generate the sentence the gansters die. In other words, we want to add plural forms of nouns and verbs.
The first thing, we have to do, is to add the new words, gangsters and die, to the grammar:
Now, the grammar clearly generates the sentence the gansters die. However, it also accepts the sentences the gangsters dies and the gangster die, which we don't want. The plural forms of the verbs should be used only if the subject is plural.
We somehow have to make sure that we use a plural VP if and only if we have a plural NP, and a singular VP, if and only if we have a singular NP. That is, we have to distinguish between singular and plural VPs and NPs. One way of doing this would be to invent new non-terminal symbols for plural and singular NPs and VPs. Our grammar would then look as follows. We would have two rules for building sentences: one for building a sentence out of a singular NP (NPsg
) and a singular VP (VPsg
), and the other one for using a plural NP (NPpl
) with a plural VP (VPpl
).
Singular NPs are built out of a determiner and a singular noun Nsg
) and plural NPs are built out of a determiner and a plural noun (Npl
). Note that we don't have to distinguish between singular and plural determiners as we are only using the at the moment, which works for both.
Similarly, singular VPs are built our of singular intransitive verbs (IVsg
) or plural intransitive verbs (IVpl
).
Finally, we have singular and plural nouns and verbs in out lexicon.
Now, the grammar does what it should: it generates the ganster dies and the gangsters die, but doesn't accept the gangster die or the gangsters dies. However, compared to the grammar we started with, it has become huge --- we have twice as many phrase structure rules, now. And we only added the information whether a noun phrase or a verb phrase is plural or singular. Imagine we next wanted to add transitive verbs and pronouns. To be able to correctly accept he shot him and reject him shot he, we would need case information in our grammar. And if we also wanted to add the pronouns I and you, we would further have to distinguish between first, second and third person. If we wanted to code all this information in the non-terminal symbols of the grammar, we would need non-terminal symbols for all combinations of these features. Hence, the size of the grammar would explode and the rules would probably become very difficult to read. But there is another reason why this strategy of adding new non-terminals is inappropriate: it misses some important generalizations. In the extended grammar above, for example, the non-terminals NPsg
and NPpl
are not more similar to each other than to say VPsg
. The generalization that they are both NPs is lost. Similarly, the information that sentence are always built out of a noun phrase and a verb phrase (although their number can vary) is lost. So, what we would like to say is something like this: "Sentences consist of an NP and a VP. They must both be of the same number; either plural or singular."
This can be captured in an elegant way, if we say that our non-terminals are no longer atomic category symbols, but a set of properties, such as type of category, number, person, case ... . Certain rules can then impose constraints on the individual properties that a category involved in that rule may have. These constraints can force a certain property to have some specific value, but can also just say that two properties must have the same value, no matter what that value is. Using this idea, we could specify our grammar like this:
: number of = number of |
: number of = singular |
: number of = plural |
: number of = singular |
: number of = plural |
Such sets of properties are commonly represented as feature structures in computational linguistics. In the rest of the section, we will introduce feature structures and two important operations on feature structures, namely, subsumption and unification.
- Up - | Next >> |