CHAPTER 12

Frame- Based Systems

12.1 The Terrorist Attack

The idea of a case-frame described in the last section can be extended. Instead of considering the case structure of a single sentence, we might consider the case structure of an entire narrative. Many stories are fairly stereotyped (like our cowboy film described in section 11.5). In these circumstances, provided others are well aware of the standard storyline, it is sufficient merely to identify the role­playing participants and associate them with their stereotyped roles.

One possible application for such an approach concerns the need to condense large volumes of text into a more accessible form. People involved in medical or biological research, for example, are required to read enormous numbers of research papers which are often of a stereotyped form. (e.g. The effect of (chemical-reagent) on (biological-tissue). Likewise news agencies and industrial and financial analysts are also required to read large volumes of text which can be structured into a standardised form. The recognition of the standardised form of many reports has led to the development of systems which 'understand' various classified texts in terms of a standardised 'frame'.

For example, a frame developed for reading newspaper reports on terrorist outrages might identify certain role-playing participants and certain attributes and factors, e.g.




The text is scanned, and the slots in the standardised frame are fIlled in with the details as they are discovered. The data identifIed could then be stored in a database for later retrieval or collation with other such stories.

Consider the following example:

Early on Monday morning three terrorists seized control of the Ruritanian embassy in Utopia. They are holding the ambassador and 19 of his staff hostage, and are demanding the release of 10 prisoners held by the Ruritanians. They have threatened to kill their hostages and blow up the building at midnight on Wednesday if their demands are not met. Government soldiers have surrounded the building, and the Chief of Police is attempting to negotiate the release of the hostages. In a telephone message from the embassy the ambassador has said that the hostages are not being badly treated, but that he feared that the terrorists would carry out their threat if the prisoners were not released. The names of the terrorists are unknown but it is suspected that they are members of the RFF (Ruritanian Freedom Fighters).

Once the case-slots in the frame have been fIlled in the system could answer questions - if these are related to the standard items in the frame - and it could match two such stories by recognising that they were concerned with the same event (by matching the information in the forms). We might describe this as reporting by form filling.

The analysis of the complete problem would consume more time and space than we can afford here, but we can do two things to help the reader towards a solution - we can show that the problem is a modified form of the 'front-end system', and we can provide a solution for a small part of the complete problem, leaving the reader to complete the process.

Note that although a ready-made representational language does not exist initially we have provided such a representational language by creating a 'frame'. To see that that is the case we should look again at the micro-graphics problem. The graphics language could be regarded as consisting of a frame:




and when we process the natural language text we 'understand it' by filling in the appropriate slots in the frames above. Of course we must be able to add more and more examples of these frames as we proceed, and it may be necessary to add more slots for colours, time-stamps etc. We should not be confused, however, by the fact that the frame format looks rather different from the graphics language statement format. They are functionally or logically identical with respect to the information stored, and since they both have a fixed format it would be a trivial task to write a program to translate from one to the other.

The second part of our partial solution requires us to write a grammar from the terrorist story text which will relate it to the slots in the frame above. Consider the first sentence, which we shall term a 'seizure sentence'. A seizure sentence tells us what was seized and who did the seizing. It may also tell us where and/or when the seizure took place.

We shall use the dot notation... to indicate that we have not exhausted all the possible patterns.

The grammar might look like this:

qss:- (when-id)ss
qss:- ss/(when-id)
qss:- (where-id)ss
qss:- ss(where-id)


where ss = seizure sentence and qss stands for 'qualified seizure sentence'. There are at least four alternative patterns. More can be added by having both a (when-id) and a (where-id) in the same sentence.

where-id:- in (town)
where-id:- in (country)
when-id:- (daytime)(datetime)
when-id:- (daytime)
when-id:- (datetime)
daytime:- at (clocktime) / early / late
clocktime:-integer.integer / noon / midnight
datetime:-today / last night / on (weekday)
weekday:- Monday / Tuesday / Wednesday / ...
town:- London / Paris / New York / ...
country:- America / Lebanon / Italy / ...
ss: -(qual-ter-agent) (seize-verb) (seized-o bj)
ss:-(seized-obj) (passive-seize-verb) by (qual-ter-agent)
ss:-(seized-o bj) (passive-seize-verb)
seize-verb:- seized / grabbed / took control of / ...
passive-seize-verb:- was seized / was grabbed / ...
qual-ter-agent:- (number)(ter-agent)
qual-ter-agent:- (nationality)(ter-agent)
qual-ter -agent: -ter-agent
ter-agent:- terrorists / (adj)terrorists
ter-agent:- men / (adj) men
ter-agent:- freedom fighters / ...
adj:- armed / hooded / masked / ...
number:- (integer) / many / a group of / ...
nationality:- Ruritanian / Utopian / ...
seized-obj:-(building) / (vehicle)
building:- (name) building / control tower / embassy / ...
vehicle:- airliner / liner / train / bus / ...


Exercise 12.1

As explained above, it is our intention only to give an indication of how a solution to this problem might be developed. The reader might care to refine this grammar and add other types of sentence. The exercise might be best suited to a small team, with each member taking a different kind of sentence for analysis. These would include:

(a) the threat sentence (or phrase),
(b) the 'storming the building' sentence (or phrase),
(c) the hostage treatment sentence (or phrase), and so on.


When a sentence type is successfully matched against the pattern described in the grammar, the appropriate frame slots are filled in as a 'side-effect'. When a word such as 'embassy' is encountered, then another 'side-effect' would be to call up an 'embassy' frame which would have a structure such as:

embassy-frame:
country of ownership:
country of location:
city of location:
ambassador's name:
attache name:
number of staff:


This would augment the existing frame and introduce an augmentation to the grammar containing patterns for such stock phrases as 'a senior attache at the embassy said ...'.

The final stage in this exercise is to construct a program which will process the frame(s) and produce a summary of the narrative. Such a system does not need to process every sentence in the text successfully. Sentences which do not correspond to the grammar can be ignored. It is usually sufficient to get a 'gist' of the narrative to be able to produce a reasonable summary.

12.2 Frames within Frames and Inheritance

The example we used in the previous section was confined mainly to one frame. It is possible, however, to use several frames at the same time to obtain a much richer representation, and we hinted at this with the mention of the 'embassy frame'. The embassy frame is an example of an 'object frame'. An object frame contains slots for the normal properties of a particular type of object. When we are ruling in the slots of a frame we might find that the appropriate slot-ruler is another frame, possibly an object frame. This augments the grammar and generates another set of slots to be filled.

One feature of object frames is that objects can usually be classified in a hierarchical structure. An Alsatian, a Corgie, an Airedale and a Spaniel are all examples of the concept 'dog'. A dog is an example ofthe concept 'animal', and so on. The frames which are associated with these objects can be organised into a hierarchical data structure as shown in Figure 12.1. In tJtese circumstances it is normal to assume that all the subordinate entities in a hierarchy possess all of the properties shown for their common superior entity, at all levels in the hierarchy. Only those properties which are peculiar to a given entity are shown explicitly, and it is assumed that these are also shared by the entities below it in the hierarchy. This property of a hierarchical structure is called the 'inheritance property'. That is, all entities 'inherit' all properties from their parents (automatically). While it may add a degree of complexity to the processing of frames, the inheritance property allows a very great saving of data storage, and in the labour involved in creating new frames. If we wish to add a new object frame to our collection (say for a 'Dalmatian'), it is sufficient to indicate that it is one of the class 'dog' instead of repeating all of the properties which are common to dogs. We need only add the information that a Dalmatian is white with black spots and is often called 'a blotting paper dog'. To construct the hierarchy each object frame should be provided with two extra slots. The first is for 'classification' and the second is for 'examples'. These are in effect the pointers to the superior entity and the inferior entities respectively. Special languages have been developed to facilitate the use of frames, of which the best known is FRL (Frame Representation Language). These languages, however, are not widely available, and the construction of a frame hierarchy (and the primitive procedures for handling frames) is a useful exercise.




12.3 Demons

In section 11.4 we described briefly the idea of embedding functions within the case-slots of a case-frame. These functions would then be activated and seek out the appropriate entity to act as a case-slot filler. The idea has particular relevance to frame-hierarchies, and the functions, or 'demons' as they are sometimes called, can be used for many purposes., In particular they can be activated whenever a case-frame is accessed in any way, with one set for update operations and another for retrieval operations. These can solve the problem of dealing with inheritance, since on accessing a frame the appropriate demon will be fired, and access its superior frames to retrieve the properties it should inherit, without these being explicitly contained in the first frame. In a programming language such as Pascal it is not possible to handle the names of functions in the same way as data, but in languages such as POPll, LISP and Prolog this is commonplace. Given the facilities of these languages it is easy to insert into a frame the name of a function which is to be called whenever the frame is processed.

12.4 Thematic and Narrative Frames

We began the discussion of frames with a study of case grammar, and the idea of a case-frame which stored all the case-slots belonging to particular verbs. We noted that there were two kinds of case to be considered, those based on syntactic phenomena and those based on more semantic ideas. We have now progressed to frames which provide a standard set of slots for entities and properties associated with a 'theme' such as the terrorist attack the.ne. Frames of this type are often called 'thematic frames' to distinguish them from the next type we shall study - 'narrative frames'. Narrative frames are often also called 'scripts', and these are the topic of the next section.