Frame-21

Frames



Example:

CHAIR frame

A-kind-of:

furniture

number-of-legs:

an integer (default=4)

style-of-back:

straight, cushioned, ...

number-of-arms:

0,1,2



John's-chair frame

a-kind-of:

furniture

number-of-legs:

4

style-of-back:

cushioned

number-of-arms:

0



Knowledge represented by frame

  1. properties inheritance hierarchies
    e.g. a-kind-of slot (similar to is-a link in semantic net)

  2. expectation, e.g. a special "range" slot which specifies what you expect the value of the slot be.

  3. attached procedure:
    a procedure knowledge which will fill-in the slot if needed, or perform other tasks.

Example:

Generic Restaurant Frame

a-kind-of:

Business Establishment

Types:

Range: (Cafeteria, Seat-Yourself, Wait-to-be-seated, Fastfood)

Default: IF plastic-orange-counter THEN fastfood
IF stack-of-trays THEN cafeteria
IF wait-for-waitress-sign OR reservation-made THEN wait-to-be-seated
OTHERWISE seat_yourself

Location:

Range: an ADDRESS

if-needed: (Look at the menu)

Name:

if needed: (Look at the menu)

Food-style:

Range: (Burgers, Chinese, American, Seafood, French)

Default: Chinese

if-added: (Update Alternative of Restaurant)

Time-of-Operation:

Range: a time-of-day

Default: open evenings except Mondays

Payment form:

Range: (Cash, CreditCard, Check, Washing-Dishes Script)

Event-Sequence:

Default: Eat-at-Restaurant Script

Alternatives::

Ranges: all restaurant with some foodstyle

if-needed: (find all restaurants with the same foodstyle)



Scripts: expectation about the sequences of events that are likely to take place:

Eat-at-Restaurant Script

Props:

(Restaurant, Money, Food, Menu, Tables, Chairs)

Roles:

(Hungry-persons, Wait-persons, Chef-persons)

Point-of-View:

Hungry-persons

Time-of-Occurrence:

(Times-of-Operation of Restaurant)

Place-of-Occurrence:

(Location of Restaurant)

Event Sequences:

first: Enter-Restaurant Script

then: if (wait-to-be-seated-sign or reservation)
then get-maitre-d's-attention script

then: please-be-seated script

then: order food script

then: eat-food-script unless (long-wait) when exit-restaurant-angry script

then: if (food-quality was better than palatable) then compliments-to-the-chef script

then: pay-for-it-script

finally: leave-restaurant script



Class Hierarchies

Example:



  1. Exhaustive Depth-first search




The depth-first, left-to-right, up-to-join approach produces the following class-precedence lists for Crazy and Jacque:

Crazy

Professors class
Eccentrics class
Teachers class
Hackers class
Programmers class
Dwarfs class
Everything class

Jacque

Weightlifters class
Athletes class
Shotputters class
Endomorphs class
Dwarfs class
Everything class






Suppose one is-a link and two ako links are added, as in figure 9.6, the class precedence lists for Crazy and Jacque are different:

Crazy

Professors class
Teachers class
Hackers class
Eccentrics class
Programmers class
Dwarfs class
Everything class

Jacque

Weightlifters class
Shotputters class
Endomorphs class
Athletes class
Dwarfs class
Everything class



Topological Sort

to flatten a partial order to form a total order

construct adjacent pairs from the partial order:
e.g.

Frame3











find a class that occupies the left side of a pair but that does not occupy the right side of any other pair. [leave nodes]. (*)

add it to the end of the precedence list and remove the pair.

repeat.

Note:

the class ordering is preserved

to preserve left-to-right ordering, add additional pairs:


Frame4









If there is a tie in (*) i.e. more than 1 node satisfy the requirement,

choose the one that is a direct superclass of the rightmost class on the emerging class precedence list (tends to prevent erratic movement through the tree)






Node

Fish-hook pairs

Crazy

Crazy-Professors, Professors-Hackers

Professors

Professors-Eccentrics, Eccentrics-Teachers

Eccentrics

Eccentrics-Dwarfs

Dwarfs

Dwarfs-Everything

Teachers

Teachers-Dwarfs

Hackers

Hackers-Eccentrics, Eccentrics-Programmers

Programmers

Programmers-Dwarfs

Everything

Everything



Frame5To compute an instance's class-precedence list,



To fill the slots in a new instance

Procedural Knowledge in Frames and Scripts

  1. Filling-in Slots



  1. Triggers

Demon Procedures in a Frame System

  1. When-constructed procedure

  1. When-requested procedure

3.When-read/When-written procedure

4.With-respect-to procedure

A frame system is a presentation

That is a semantic net

In which

With constructors that

With writers that

With readers that



Example: Digesting News



Frame6

Frame8










Frame9



To summarize:



Thematic-Role Frames

A thematic-role system is a representation

that is a frame system

in which



Thematic roles:

  1. Agent: cause the action to occur.

  2. Coagent: a partner to the principal agent

    e.g. Robbie played tennis with Suzie.

  3. Beneficiary: for whom an action is performed

    e.g. Robbie bought the ball for Suzie

  4. Thematic object: the object with which the sentence is really all about.

    e.g. Robbie hit the ball

  5. Instrument: a tool used by the agent.

    e.g. Robbie hit a ball with a racket.

  6. Source and destination: change in physical location

    e.g. Robbie went from the dining room to the kitchen

  7. Old surroundings and new surroundings

    e.g. Robbie took the cereal out of the box and put it into the bowl.

  8. Conveyance: on which one travels.

    e.g. Robbie always go by train.

  9. Trajectory: Motion from source to destination.

    e.g. Robbie and Suzie went in through the front door.

  10. Location: where the action occurs.

    e.g. Robbie and Suzie studied in the library, at a desk, by the wall, under a picture, near the door.

  11. Time: specifies when an action occurs.

  12. Duration: how long an action takes

    e.g. Robbie and Suzie jogged for an hour.




What was made? 0 thematic object 0 coffee
Who made it? 0 agent 0 Robbie
With what was it made? 0 instrument 0 a percolator
For whom was it made? 0 beneficiary 0 Suzie

Who went? 0 agent 0 Robbie
With whom did he go? 0 coagent 0 Suzie
To where did he go? 0 destination 0 the theatre
By what means did they travel? 0 conveyance 0 car



Establish Thematic Roles

Preposition

Allowable thematic role

by

agent or conveyance or location

with

coagent or instrument

for

beneficiary or duration

from

source

to

destination



Establishing Verb Meaning



Sentence Analysis



To determine thematic roles,



Example:

Consider a small world:



and consider the following simple constraints:

Thematic role

Preposition

Allowed class

agent

by

person

coagent

with

person

beneficiary

for

person

thematic object

-

-

instrument

with

inanimate

source

from

-

destination

to

-

old surroundings

out of

inanimate

new surroundings

into

inanimate

conveyance

by

inanimate

duration

for

a time



And in the dictionary, the word take has the following meanings:

Robbie took aspirin

Robbie took aspirin for Suzie

Robbie took out Suzie

Robbie took out the box

Robbie took the ball to Suzie

Robbie took Suzie

Robbie took Suzie to town

The bell was taken out of town by Robbie by car for a day for Suzie



Primitive Actions Frames