In this section we discuss an approach to grammar that differs from the traditional context-free, phrase-structure grammars. As a specific example we look at categorial grammars.
This approach has a number of aspects which it shares with some other grammars:
[ Up to Lexically Oriented Unification Grammars]
Categorial grammars express their categories in terms of a very small set of primitive categories (typically 'S' and 'N', and a set of operators which can express more complex categories (typically '/', '\' and parentheses).
It is based on the observation that beneath the complex set of syntactic categories, language is basically statements about things.
The category 'N' indicates a noun phrase (thing); the category 'S'indicates a sentence or a clause (statement).
It is usually the case in language that order matters to some degree. There CG uses two primitives to describe expectations about order. The '/' can be called a right-search operator, because it indicates that the word seeks constructions of a particular category to its right; conversely the '\' operator can be called a left-search operator.
Consider our previous example 'Jesus wept.' Here Jesus is assigned the category 'N', since it makes reference to an entity. The completed sentence has the category 'S'. 'Wept' here has the category 'SN', because it is in effect 'a sentence waiting wo happen'. All it needs is to be preceded by a word or phrase to indicate the entity doing the weeping, and it will be a complete statement.
Examples:
So one sense of the verb 'open' is defined in effect as a sentence waiting to happen, all it needs is a noun phrase before it (to indicate who's doing the opening), and a noun phrase after it (to indicate what's being opened).
A fairly simple set of rules describes how categories can combine:
X + Y\X -> Y
X/Y + Y -> X
X + Y\X/Z -> Y/Z
X\Y/Z + Z -> X\Y
(Where X,Y, and Z can be any category)
An interesting aspect of categorial grammars is that they lend themselves to parsing incrementally left-to-right. Note that we can characterize the phrase 'John opened...' as a sentence waiting for a noun phrase to its right (S/N).
There is no limit to the number of categories which can be generated in a categorial grammer. A ditransitive verb like 'give' can have the category S\N/N/N. One sense of preposition like 'in' can be defined as 'S\S/N'(see the illustration).
Another advantage of categorial grammars is that they can easily accommodate words like 'wanna', which overstep the boundaries of traditional phrase structures. We can even go a step further and collect a large number of frequently occuring phrases, pre-parse them and use them as lexical entries regardless of whether they straddle traditional phrase boundaries.
[ Up to Lexically Oriented Unification Grammars]
Note that categorial grammars assign the same category to 'the' as to adjectives (e.g. 'big : N/N') doesn't that wildly overgenerate? Actually the categories only deal with issues of word order, other constraints need to be added to lexical entries as well:
Which would mean that 'the' looks for a noun to its right (with the index '1'), that n1 must have the feature [- det], and that the result will be whatever features pertained to n1, with the exception of feature [+ det]
Compare this with the definition for 'big' which might look like:
If we have a definition like:
... and we see the phrase 'big dog', then we can unify the two entries to produce:
...and in the case the 'the big dog':
Note that the constraint on 'the' that says 'n1' must be [-det] expresses the fact that 'the the dog' is unacceptable.
Unification can also apply to verbs if we include references to roles which typically pertain to them. For example:
We will discuss the idea of roles in greater detail in our discussion of semantics.
[ Up to Lexically Oriented Unification Grammars]
Note that in order for this scheme to work we need to have a seperate entry for every sense of every word in our lexicon.
In order to reduce the complexity, we would be strongly motivated to find a way of expressing generalities.
We can use inheritance heirarchies to express these generalities.
We can provide for default values for features which will hold for the descendents unless indicated otherwise.