Computer Literacy: Lecture 27

December 12, 1996

Streinu-Bergmann-Thiebaut

Slide1: A Little Story Slide 7:Semantics: Conceptual Dependency
Slide 2:Syntax: A Sample Grammar Slide 8: Semantics: Anaphoric Reference Resolution
Slide 3: Syntax: Derivation Trees Slide 9: Ways to Represent Semantic Information
Slide 4:Syntax: Annotated Derivation Trees Slide 10: Pragmatics
Slide 5: A problem for parsing Slide 11: More Pragmatics
Slide 6: Semantics: Meaning Representation

SLIDE 1

A LITTLE STORY

Mary went to a birthday party at Jane's house. Jane's mother gave Mary a balloon. While Mary was walking home, it popped. Mary cried.
Back to top


SLIDE 2

Sentence -- NounPhrase VerbPhrase

Sentence -- AdverbialConjunction Sentence Sentence

NounPhrase -- ProperName
NounPhrase -- Pronoun
NounPhrase -- Determiner Noun
NounPhrase -- Possessive Noun
NounPhrase -- NounPhrase PrepositionalPhrase

Noun -- Noun Noun

Possessive -- NounPhrase 's

PrepositionalPhrase -- Preposition NounPhrase

VerbPhrase -- IntransitiveVerb
VerbPhrase -- BitransitiveVerb NounPhrase NounPhrase
VerbPhrase -- VerbPhrase PrepositionalPhrase
VerbPhrase -- VerbPhrase Adverb

A Dictionary:

a: Determiner
at: Preposition
birthday: Noun
balloon: Noun
cry: IntransitiveVerb
give: BitransitiveVerb
go: IntransitiveVerb
home: Adverb, Noun
house: Noun
it: Pronoun
Jane: ProperName
Mary: ProperName
mother: Noun
party: Noun
pop: IntransitiveVerb
to: Preposition
walk: IntransitiveVerb
while: AdverbialConjunction

Note: the dictionary must give the root form for verbs of different tenses, e.g.,

RootForm (went) = go
RootForm (gave) = give
RootForm (popped) = pop
RootForm (cried) = cry

Also, we need verb sequence rules which will tell us, for example, that

was walking is a past tense progressive verb with RootForm(MainVerb) = walk

Back to top


SLIDE 3

SYNTAX: DERIVATION TREES

             Sentence
               /   \
              /    VerbPhrase
             /        /    \
            /        /      PrepositionalPhrase
           /        /           /       \
          /        /           /      NounPhrase
         /        /           /        /       \
        /        /           /        /    PrepositionalPhrase
       /        /           /        /             /    \
      /        /           / NounPhrase           /  NounPhrase
     /        /           /     /    \           /        /  \
NounPhrase   |           /     /     Noun       /   Possessive\
   |         |          /     /      / \       |        /  | \
   |    VerbPhrase     /     /      /   \      | NounPhrase|  \
   |         |        |     /      /     \     |       |   |   \
Proper  IntranVerb  Prep  Art  Noun     Noun Prep  Proper 's Noun
Mary    went        to    a   birthday  party  at    Jane's house
 



                Sentence
               /       \____
              /             \
     NounPhrase              VerbPhrase
       /   \                  /      \ \____________
      /     \                /        \              \ 
Possessive   \              /          NounPhrase   NounPhrase
   |          \            /              |           /   \
Proper 's   Noun    BitransitiveVerb   Proper       Art   Noun
Jane's      mother  gave               Mary         a     balloon





                                Sentence
    ----------------------------/ /    \            
   |                    ---------/      \_______
   |                Sentence                    \
   |                /      \                     \
   |            ---/       VerbPhrase             Sentence
   |           |           /    \                 /      \
   |    NounPhrase VerbPhrase    \         NounPhrase VerbPhrase
   |        |          |          \           |           |
AdConj   Proper   IntransVerb     Adverb   Pronoun    IntransVerb
While    Mary     was walking     home,    it         popped.







       Sentence
       /     \
NounPhrase  VerbPhrase
   |            |
Proper      IntransVerb
Mary        cried.







Back to top



SLIDE 4

SYNTAX: ANNOTATED DERIVATION TREES

              Sentence
               /   \
              /    VerbPhrase
             /        /    \
            /        /      PrepositionalPhrase
           |        |        [to-modifier]
           /        /           /       \
          /        /           /      NounPhrase
         /        /           /        /       \
        /        /           /        /      PrepositionalPhrase
       /        /           /        /             /    \
      /        /           / NounPhrase           /   NounPhrase
     /        /           /     /    \           /        /   \
NounPhrase   |           /     /     Noun       /   Possessive \
[subject]    |          |     |       |        |       /  \    |
   |         |          /     /      / \       |      /    \   |
   |    VerbPhrase     /     /      /   \      | NounPhrase|   |
   |         |        |     /      /     \     |      |    |   |
Proper  IntranVerb  Prep  Art  Noun     Noun  Prep Proper 's Noun
Mary    went        to    a    birthday party  at    Jane's house




                Sentence
               /       \____
              /             \
     NounPhrase              VerbPhrase
     [subject]                 /    \ \
       /   \                  /      \ \_____________
      /     \                /        \              \ 
Possessive   \              /          NounPhrase   NounPhrase
   |         |              |         [indirect obj] [direct obj]
   |          \            /              |           /   \
Proper 's   Noun    BitransitiveVerb   Proper       Art   Noun
Jane's      mother  gave               Mary         a     balloon








Back to top



SLIDE 5

A problem for parsing: syntactic ambiguity!

Example 1:

Time flies like an arrow.

Example 2:

John drove the car through the village.

John drove the car with the racing stripes.

John drove the car in the driveway.

Back to top


SLIDE 6

SEMANTICS: MEANING REPRESENTATION

Conceptual Dependency Meaning Representation

(Roger Schank and Robert Abelson, Scripts, Plans, Goals and Understanding, New York: Wiley, 1977, pp. 43-44)

Basic Axiom: For any two sentences that are identical in meaning, regardless of language, there should be only one representation.

Ex.: Mary gave Tom a book; Tom was given a book by Mary

Tom is a bachelor; Tom is an unmarried man; Tom,

who is unmarried, is a man.

Corollary: Any information in a sentence that is implicit must be made explicit in the representation of the meaning of that sentence.

Ex.: Someone gave Tom a book; Tom was given a book.

PRIMITIVE ACTS OF CD REPRESENTATION

ATRANS: the transfer of an abstract relationship

such as possession, ownership or control

examples: give, sell

PTRANS: the transfer of the physical location

of an object

examples: put, go

PROPEL (an object)

MOVE (one's body part)

GRASP (an object)

INGEST (an object)

EXPEL (an object)

MTRANS: the transfer of mental information between

animals or within an animal

examples: think, tell

MBUILD: the construction by an animal of new

information from old information

example: form an idea

SPEAK

ATTEND (pay attention to)

In addition, we have STATES and CHANGES OF STATE for

sentences like John is happy, John lost weight.

Back to top


SLIDE 7

SEMANTICS: CONCEPTUAL DEPENDENCY

REPRESENTATION OF THE STORY

Mary went to a birthday party at Jane's house.

Ptrans

Agent Mary

Object Mary

From ?Somewhere

To BirthdayParty

Loc-at House

Possessed-by Jane

Tense Past

Back to top


SLIDE 8

SEMANTICS: ANAPHORIC REFERENCE

RESOLUTION

Sample rule: To find the antecedent of an anaphor, choose the

most recently referred-to object of the correct sort (correct sort for 'it' is inanimate)

Examples: John saw a car. It was red.

The car belonged to John. It was red.

John saw a car. He was happy.

The car belonged to John. He was happy.

Mary went to a birthday party at Jane's house. Jane's mother gave Mary a balloon. While Mary was walking home, it popped.

It : refers to event or inanimate object or animal

Previous references to events or inanimate objects:

birthday party

Jane's house

balloon

Mary's house ("home")

If we choose the most recently referred-to event or inanimate

object, we have Mary's house popping!

Therefore, we need to know that balloons are the sorts of things

that pop; houses aren't!

Back to top


SLIDE 9

SUPPLEMENTARY WAYS TO REPRESENT SEMANTIC

INFORMATION

Semantic Networks

                                           Thing
                                ____________/\____________
                               |                         |
                            Object                    Event
                  ___________/  \____________        . . . .
                 |                           |
              Animate                    Inanimate
          _____/  \_____              _____/   \______
         |    . . .     |            |    . . . .     |           
       Human         Animal        Building          Toy
       /   \         /   \         /   \            /  \
     Woman  Man    Dog   Cat  House  Skyscraper Doll Balloon



Frames

    House
        Isa       Building
        Function  Dwelling
        Structure WoodFrame | Brick | Stucco

    Balloon
        Isa       Toy
        Structure Rubber filled with air

    Toy
        Isa       Object
        Function  Amuse children



Back to top



SLIDE 10

PRAGMATICS: BEYOND SENTENCE MEANING TO DISCOURSE RULES AND WORLD KNOWLEDGE

SCRIPTS
(Roger Schank and Robert Abelson, Scripts, Plans, Goals and Understanding, New York: Wiley, 1977, pp. 43-44)

-----------------------------------------------------------------

A COFFEE SHOP STORY (by Merrie Bergmann):

John went to a coffee shop.  He ordered eggs and bacon.  He gave the waitress a big tip and he left.

Question: Did the waitress bring John eggs and bacon?
          Did John pay for the eggs and bacon?
-----------------------------------------------------------------

Restaurant Script (track: coffee shop)

Props: Tables Menu Food(F) Check Money
Roles: Customer(S) Waiter(W) Cook(C) Cashier(M) Owner(O)

Entry Conditions: S is hungry.  S has money.
Results: S has less money.  O has more money.  S is not hungry.
         S is pleased (optional)

Scene 1: Entering
S PTRANS S into restaurant
S ATTEND eyes to tables
S MBUILD where to sit
S PTRANS S to table
S MOVE S to sitting position

Scene 2: Ordering
(menu on table)            (W brings menu)
S PTRANS menu to S         W PTRANS W to table
        |                  W ATRANS menu to S
        |                         |
        ---------------------------
        |
S MTRANS food list to CP(S)
*S MBUILD choice of F
S MTRANS signal to W
W PTRANS W to table
S MTRANS 'I want F' to W
W PTRANS W to C
W MTRANS (ATRANS F) to C
        |
        ---------------------------
        |                         |
C MTRANS 'no F' to W             C DO (prepare F script)
W PTRANS W to S                  to Scene 3
W MTRANS 'no F' to S
(to back to *) or (go to Scene 4 at no pay path)

Scene 3: Eating

C ATRANS F to W
W ATRANS F to S
S INGEST F
(Optionally return to Scene 2 to order more) or (go to Scene 4)

Scene 4: Exiting
S MTRANS to W (W ATRANS check to S)
W MOVE (write check)
W PTRANS W to S
W ATRANS check to S
S ATRANS tip to W
S PTRANS S to M
S ATRANS money to M
S PTRANS S to out of restaurant (no pay path starts here)

Back to top




SLIDE 11

MORE PRAGMATICS: What else is needed to
understand this story?

1.  Assuming that we have a birthday party script, one of the EXIT conditions might be: People at a birthday party are (still) happy when they leave.

2.  Common knowledge about crying: People who cry are unhappy or surprised or afraid.

3.  So we have a puzzle: why did Mary cry?

Some rules of orderly discourse:

1.  Narratives usually proceed in an orderly fashion, for example, sentence order indicates temporal order.

   Between the birthday party and Mary's crying, two
   things happened: Mary was walking home, and the
   balloon popped.

2.  Important facts are usually stated.

   Because the birthday party doesn't explain Mary's
   crying, one of these two events most likely does
   explain her crying.

3.  Which one of these two events is the culprit? Two possible (complementary) strategies for deciding:

a.  Pragmatics of sentence structure

   While X, Y. 
 
   The focus of this sentence is Y.  That's the
   important thing.

   So infer: the balloon's popping made Mary cry,
   because it is the important event that happened.

b.  World knowledge: What sort of events make children unhappy?

Walking home?  Not as a rule!

Balloons popping?  Sure: the loud noise, the fact that the balloon is now "broken", . . .

Back to top