

Semantics and Pragmatics
by Nikos Drakos, Computer Based Learning Unit, University of Leeds, UK
Semantics and Pragmatics
The remaining two stages of analysis, semantics and pragmatics, are concerned with getting at the meaning of a sentence. In the first stage (semantics) a partial representation of the meaning is obtained based on the possible syntactic structure(s) of the sentence, and on the meanings of the words in that sentence. In the second stage, the meaning is elaborated based on contextual and world knowledge. To illustrate the difference between these stages, consider the sentence:
- He asked for the boss.
From knowledge of the meaning of the words and the structure of the sentence we can work out that someone (who is male) asked for someone who is a boss. But we can't say who these people are and why the first guy wanted the second. If we know something about the context (including the last few sentences spoken/written) we may be able to work these things out. Maybe the last sentence was "Fred had just been sacked.", and we know from our general knowledge that bosses generally sack people and if people want to speak to people who sack them it is generally to complain about it. We could then really start to get at the meaning of the sentence — Fred wants to complain to his boss about getting sacked.
Anyway, this second stage of getting at the real contextual meaning is referred to as pragmatics. The first stage — based on the meanings of the words and the structure of the sentence — is semantics and is what we'll discuss a bit more next.
Semantics
In general, the input to the semantic stage of analysis may be viewed as being a set of possible parses of the sentence, and information about the possible word meanings. The aim is to combine the word meanings, given knowledge of the sentence structure, to obtain an initial representation of the meaning of the whole sentence. The hard thing, in a sense, is to represent word meanings in such a way that they may be combined with other word meanings in a simple and general way.
Its not really possible even to present a simple approach to semantic analysis in less than half a lecture — I can only outline some of the problems and show what the output of this stage of analysis may be (though in general there are many different semantic theories and representations, just as there are many different grammar formalisms).
First, lets go back to our syntactically ambigous sentences and see how semantics could help:
- Time flies like an arrow.
- Fruit flies like a banana.
If we have some representation of the meanings of the different words in the sentence we can probably rule out the silly parse. We might look up "banana" (maybe in some frame or semantic net system) and find that it is a fruit, and fruits generally don't fly. We might then the able to throw out the reading "flies like a banana" if we made sure that sentences which mean "X does something like Y" require that X and Y can do that thing!
Sometimes ambiguity is introduced at the stage of semantic analysis, for example:
- John went to the bank.
Did John go to the river bank or the financial bank? We might want to make this explicit in our semantic representation, but without contextual knowledge we have no good way of choosing between them. This kind of ambiguity occurs when a word has two possible meanings, but both of them may, for example, be nouns.
To obtain a semantic representation it helps if you can combine the meanings of the parts of the sentence in a simple way to get at the meaning of the whole (The term compositional semantics refers to this process). For those familiar with lambda expressions, one way to do this is to represent word meanings as complex lambda expressions, and just use function application to combine them. To combine a noun phrase "John" and a verb phrase "sleeps" we might have:Verb phrase meaning:
![]()
Noun phrase meaning: john.
Apply VP meaning to NP meaning:=
![]()
The output of the semantic analysis stage may be anything from a semantic net to an expression in some complex logic. It will partially specifies the meaning of the sentence. From "He went to the bank" we might have two possible readings, represented in predicate logic as:
![]()
![]()
Good representations for sentence meaning tend to be much more complex than this, to properly capture tense, conditionals, etc etc, but this gives the general flavour.
Pragmatics
Pragmatics is the last stage of analysis, where the meaning is elaborated based on contextual and world knowledge. Contextual knowledge includes knowledge of the previous sentences (spoken or written), general knowledge about the world, and knowledge of the speaker.
One important task at this stage are to work out referents of expressions. For example, in the sentence "he kicked the brown dog" the expression "the brown dog" refers to a particular brown dog (say, Fido). The pronoun "he" refers to the particular guy we are talking about (Fred). A full representation of the meaning of the sentence should mention Fido and Fred.
We can often find this out by looking at the previous sentence, e.g.:
Fred went to the park.
He kicked the brown dog.We can work out from this that "he" refers to Fred. We might also guess that the brown dog is in the park, but to work out that we mean Fido we'd need some extra general or contextual knowledge — that the only brown dog that generally frequents the park is Fido. In general this kind of inference is pretty difficult, though quite alot can be done using simple strategies, like looking at who's mentioned in the previous sentence to work out who "he" refers to. Of course, sometimes there may be two people (or two dogs) that the speaker might be referring to, e.g.,
There was a brown dog and a black dog in the park. Fred went to the park with Jim. He kicked the dog.In cases like this we have referential ambiguity. It is seldom quite as explicit as this, but in general can be a big problem. When the intended referent is unclear a natural language dialogue system may have to initiate a clarification subdialogue, asking for example "Do you mean the black one or the brown one.".
Anyway, another thing that is often done at this stage of analysis (pragmatics) is to try and guess at the goals underlying utterances. For example, if someone asks how much something is you generally assume that they have the goal of (probably) buying it. If you can guess at people's goals you can be a bit more helpful in responding to their questions. So, an automatic airline information service, when asked when the next flight to Paris is, shouldn`t just say "6pm" if it knows the flight is full. It should guess that the questioner wants to travel on it, check that this is possible, and say "6pm, but it's full. The next flight with an empty seat is at 8pm."
![]() |
Voltar ao começo da página |
![]() |
Voltar à página principal |
![]() |