| Practical Natural Language Processing / Proseminar Künstliche Intelligenz / SS 1998 / Philipp Stolka |
A similar problem can occur with grammar.
In the above examples, we have only used extremely trivial grammars with a handful of rules. But even with more sophisticated grammars we will always find sentences that will not be representable, either because they are too complex or simply because they are wrong. We should provide some methods to catch those cases.
For this task, we need to take another dimension of texts into account, the semantics.
Of course, the texts generated are not stand-alone, but rather want to express something, a meaning. This meaning in connection with the text is called semantics. The BNF notation we have used so far is not suited to express anything beyond the fact whether a sentence is grammatical or not, so we need a more powerful formalism to help us extracting a meaning. Besides, this could help us in the case we have just mentioned - when a sentence is not grammatical, it can still have some (rudimentary) meaning.
This can be achieved by augmenting the grammar, passing arguments to nonterminal symbols. These arguments can have many different uses, you could use these to represent situations or names, for example. Without going into the logical intricacies of first-order logic or the Definite Clause Grammar that develops out of it we can say that nonterminal symbols were replaced by simple strings with no further meaning in our earlier BNF notation. When augmenting the grammar, you can use the additional information in the parameters to associate meanings with strings and to achieve context-sensitivity.
This context-sensitivity is needed when you have to make NPs and VPs agree in case and number, for example in "I am taking it for me" instead of "I are taking it for I", which would be agrammatical in natural English, but not in simpler formal grammars which do not account for grammatical cases. Another example is that verbs sometimes only accept certain types of NPs as objects. Then, there are verbs that can convey many different meanings depending on the context, the same applies to nouns etc.
Thus, we will have to switch to context-sensitive grammars, that is, grammars that take the word's context into account (not the sentence's context - this would lead to discourse understanding problems which we will discuss later).
Until now, the nonterminal symbols like NP represented a logical term likeNP(string),that is, their meaning was held only by the string with which they were substituted. Now we want to have symbols that are more expressive.
TakeNP(semantics),for example. This should express its meaning (its semantics) already in this early stage of processing where you still deal with nonterminal symbols and not only later in the hearer's mind.NP(semantics)could, grammatically, be expanded toNP(semantics, string),a string representing certain semantics. We can also extend the range of the rewrite rules: Instead of specifying what nonterminal symbols can appear in them we can insert variables that can hold many different types of other nonterminal symbols.
Then, you also have to see that some verbs differ in their syntactic structure from others. Some accept objects, some don't, so you have to represent this distinction in your system, too. This is called verb subcategorization: A list is built that contains all verbs and sorts them according to their syntax.
verb subcategorization list example graze [] The horse grazes. sign [PP] I sign at you. translate [NP], [NP PREP NP] I translate English to Chinese.
This is integrated to the grammar through several steps; important to us is just that the rewrite rules are modified so that they can correctly describe the new situation where there are more restrictions to the allowed range of verbs.
There are many occasions on which you need to know the semantic relationships between single phrases.
To cite the examples from [AI23], there are nominal compounds (compositions of nouns that serve to specify the object in question more exactly) and a similar structure called apposition (here two distinct noun phrases refer to the same object), then there are adjective phrases (adjectives that describe a noun; that is, adjectives don't only describe verb phrases), and determiners (phrases that express which object is in question) like "a", "the", "one" etc. (these can become arbitrarily complex).
More intricate difficulties include metonymies where one object substitutes another and the closely related metaphors where a whole phrase can bear a different meaning from its literal one.
Semantics are also important for the determination of other terms' grammatical and semantical classes. Many sentences can be very ambiguous, but usually one can extract the intended meaning by looking at the context of the phrase in question. This is again an uncertain reasoning problem, as all the semantics can often only be described probabilistically.
All this plays a crucial role in the area of discourse understanding.
When examining a complete discourse, you face a large amount of anaphoras, causal and temporal ambiguities etc. that can only be correctly accounted for when you have access to the phrases' semantics and the situations meaning. Almost any text can be interpreted in different ways, and these can only be differentiated by knowing what the context is. This means that not only mere disambiguation on word and phrase level is important for text understanding, but incorporation that embraces world knowledge is significant, too.
This world knowledge gives you information about how the discourse elements, the segments (words, phrases, sentences, paragraphs etc.), are correlated. This could include evaluation, causal, elaboration and explanation relations between the segments.
| prev: | 3.3 - Unknown Words |
| this: | 4 - Semantics |
| next: | 5 - Summary |