CHAPTER 13
Scripts and Plans
13.1 From Frames to Scripts
Although frame-based systems such as the one described in the previous chapter are often
entertaining to create, and can serve a useful purpose, most people would agree that they
are unsatisfactory as a model for human natural language processing. Of course we all take
advantage of the cliches used in news reports to cut the intellectual effort involved in
understanding, but the frame-based system would be lost without them. It does not 'understand'
the text in the same way that the small child reading the Peter and Jane story understands the text.
Such a child builds an internal representation of the narrative which is dynamic and which conforms
to the elementary laws of the physical world. If the story says 'Peter throws the ball', the child
can visualise the ball describing a parabolic curve, rising and then falling.
When the story says 'Rover catches the ball', the child visualises the dog catching the ball in its mouth.
In other words the 'world knowledge' of the child is much richer than that provided by the simple frame data structure.
He or she knows some facts concerning the way certain events 'cause' other events.
The frame-based system works because the humans who use it know the pattern of events involved
in a terrorist hijack story. They fill in for themselves the connecting links between the bare facts stored in the frame.
They know that the terrorists plan ana execute the hijack.
They know that the hostages are unwilling participants and would escape if possible.
They know that the negotiators are in a dilemma, and could overpower the terrorists quite easily
if they did not care about the consequences to the hostages, and so on.
The frame based system has no knowledge of the chronology of events, no knowledge of the motivation
of the participants, no knowledge of the causation of events and therefore no knowledge of the implications of the events.
It cannot fill in gaps in the story from its imagination and knowledge of the world.
In recognition of some of these deficiencies of frame-based systems another type of system, based on so-called 'scripts',
has been developed.
13.2 Scripts
A script is still tied to stereotyped events, but it contains within it a representation of the chronology and causation involved.
It tells a basic storyline, with blanks to be completed as an actual story is processed.
Scripts can be somewhat complex, and a typical script will contain other simpler scripts
within it (like subroutines). The difference between a script (or narrative frame) and a thematic
frame as described in section 12.1 is not a sharp one. It is rather a difference of degree of detail,
and hence of richness and of representational power.
A script which describes a student going to a college lecture might be structured as follows:
--------------------------------------------------------------------
lecture script
--------------------------------------------------------------------
players: student, lecturer
props: chair, notebook, pen, bag, desk, lecture room, college
time-of-occurrence: times-of-operation of college
location: location of college
event-sequence:
first: enter-Iecture-room(student) script (**)
then: find-empty-desk script
then: sit-at-desk script
then: take-out-notebook script
then: enter-lecture-room (lecturer) script
then: give-Iecture(lecturer) script
take-notes(student) script (*)
then: ask-question(student,lecturer) script
finally: leave-lecture-room script
---------------------------------------------------------------------
* = main concept
** = header
Each of the sub-scripts will be laid out in similar fashion.
Sub-scripts will have sub-sub-scripts, and so on until primitive operations are used
which require no further explanation. Primitive operations might involve the contact of pen on paper,
the movement of the pen, the speaking of the lecturer and so on.
The idea underlying the use of scripts is that when oneis invoked, as the script above might be
by the sentence: 'John went to a lecture' the system (like a human) knows or anticipates all the
remainder of the script. We do not need to be told that the lecturer spoke, that the students took notes etc.
A script provides more information than a frame, and for that reason is more complex.
Given the information - 'John went to a lecture' - both a frame- and a script-based system might then
ask the question 'What did he use to write with?', but only the script would know that the act of
writing would normally takes place after the act of entering the lecture room. A script therefore
represents a standard or typical scenario, and if no other information is provided it can be assumed
that the scenario has taken place according to expectations. An important feature of a script is that
certain participants and props ar.e assumed to be present even if there is no mention of them in the
narrative. In fact the opposite is the case; the absence of an anticipated participant calls for comment
rather than the reverse.
The events described by a script can be blocked by obstacles, as in the sentence 'John went to a lecture
but the lecturer did not turn up'. Scripts should therefore be capable of modification as a story unfolds.
The most interesting implementations of the scripts idea also make use of the theory of conceptual
dependencies, which we discuss in Chapter 14. We will, therefore, reserve the description of an
implementation of scripts until Chapter 15.
13.3 Triggers
One of the major problems associated with the use of scripts is that of providing the system with
triggers to invoke and terminate appropriate scripts. The simplest method of invoking a script is
to associate each script with a keyword. In our example the word 'lecture' would be a suitable trigger.
In many cases, however, the trigger word is a verb. Another possible trigger is a 'precondition'.
In our example a suitable precondition would be that 'John' is a student studying for examinations.
Additional possible triggers are associated with locations and the use of 'instruments'.
'University' or 'college' would be a suitable location trigger in our example, but there does not
appear to be an obvious instrument to act as trigger in this example.
In principle then, the text is scanned for a keyword trigger. The appropriate script is invoked and
the text is processed in order to find fIllers for its slots. As the slots are updated, demons will be fired,
and if the filler for a slot has particular significance another script may be activated, and the process continued.
The updating of certain slots may act as a trigger which closes the script (e.g. the time of leaving the lecture).
The system will then return to filling in the slots of any script which was active when the current script was
activated - rather as control returns to the main program after a subroutine call.
13.4 Plans
Scripts represent one of the most promising lines of development in natural language processing,
but there is something ad hoc about the approach which is unsatisfactory. Scripts have been developed
for a number of scenarios, often associated with stereotyped social activities in the USA such as a visit
to a restaurant or a supermarket. There are, however, some limitations to their use, particularly when the
events of a narrative are not stereotyped. Consider the following text for example:
'John went down to the river and gazed at the inviting hills beyond the wide stretch of water.
He resolved to go the following week to a lecture on canoe building.'
Now the lecture script will not contain anything about canoes, because there is no reason to select
this topic for special mention from all the other possible topics. Likewise it has nothing about rivers or hills.
Conversely, if we could devise a script about 'inviting hills' it is unlikely that we would think it appropriate
to include within it anything about canoes, and a canoe script is unlikely to contain information about lectures.
But we can all understand the connection between the first and the second sentences. The link lies in the obvious
plan which John is formulating to get across the water. The scenario described, however, has no ready-made script
to act as a support for our system. Recognising this, those who introduced the idea of scripts have also introduced
the idea of 'plans'.
Representations for plans have been developed for a number of situations.
A basic plan to 'go somewhere' might consist of a number of sub-plans involving
various possible methods of transportation. A script can be thought of as a stereotyped
sequence of events which is related to implicit plans designed to achieve some overall major plan.
A plan is a more high-level organisation of a narrative, and is more general in that it will fit a
rather wider set of circumstances.
We can therefore develop systems which use plans as the basic method of understanding,
and take the occasional short cut if a suitable script is available.
It is not appropriate at this stage for us to develop a script-based system
because we have not yet discussed the primitive actions in terms of which the
scripts and their sub-scri ts must ultimately be represented. These are the
subject of the next chapter. It is interesting to note, however, that with the
idea of plans we have introduced the idea of explicit representation of motivation -
an idea which has profound implications.