Notes
Slide Show
Outline
1
COMMUNICATION
  • Chapter 22
2
Outline
  • Communication as Action
  • Formal Grammar
  • Syntactic Analysis (Parsing)
  • Augmented Grammars
  • Semantic Interpretation
  • Ambiguity and Disambiguation
  • Discourse Understanding


3
Communication
  •  Communication
    • Intentional exchange of information brought about by the production and perception of signs drawn from a shared system of conventional signs
  • Humans use language to communicate most of what is known about the world
  • The Turing test is based on language
4
Communication as Action
  •  Speech act
    • Language production viewed as an action
  • Speaker, hearer, utterance
  • Examples:
    • Query: “Have you smelled the wumpus anywhere?”
    • Inform: “There’s a breeze here in 3 4.”
    • Request: “Please help me carry the gold.” “I could use some help carrying this.”
    • Acknowledge: “OK”
    • Promise: “I’ll shoot the wumpus.”
5
Fundamentals of Language
  • Formal language: A (possibly infinite) set of strings


  • Grammar: A finite set of rules that specifies a language


  • Rewrite rules
    • nonterminal symbols (S, NP, etc)
    • terminal symbols (he)
    • S ® NP VP
    • NP ® Pronoun
    • Pronoun ® he

6
Chomsky Hierarchy
  • Four classes of grammatical formalisms:
  • Recursively enumerable grammars
    • Unrestricted rules: both sides of the rewrite rules can have any number of terminal and nonterminal symbols
    • AB ® C
  • Context-sensitive grammars
    • The RHS must contain at least as many symbols as the LHS
    • ASB ® AXB
  • Context-free grammars (CFG)
    • LHS is a single nonterminal symbol
    • S ® XYa
  • Regular grammars
    • X ® a X ® aY

7
Component Steps of Communication
  • SPEAKER:
  • Intention
    • Know(H,ØAlive(Wumpus,S3))
  • Generation
    • “The wumpus is dead”
  • Synthesis
    • [thaxwahmpaxsihzdehd]

8
Component Steps of Communication
  • HEARER:
  • Perception:
    • “The wumpus is dead”
  • Analysis
    • (Parsing):


    • (Semantic Interpretation): ØAlive(Wumpus, Now)
    • Tired(Wumpus, Now)
    • (Pragmatic Interpretation): ØAlive(Wumpus1, S3)
    • Tired(Wumpus1, S3)

9
Component Steps of Communication
  • HEARER:
  • Disambiguation:
    • ØAlive(Wumpus1,S3)


  • Incorporation:
    • TELL( KB,  ØAlive(Wumpus1,S3) )

10
Formal Grammar
  • The lexicon for eo:


  • Noun ® stench | breeze | glitter | wumpus | pit | pits | gold | …
  • Verb ® is | see | smell | shoot | stinks | go | grab | turn | …
  • Adjective ® right | left | east | dead | back | smelly | …
  • Adverb ® here | there | nearby | ahead | right | left | east | …
  • Pronoun ® me | you | I | it | …
  • Name ® John | Mary | Boston | Aristotle | …
  • Article ® the | a | an | …
  • Preposition ® to | in | on | near | …
  • Conjunction ® and | or | but | …
  • Digit ® 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9


11
Formal Grammar
  • The grammar for eo:


  • S ® NP VP I + feel a breeze
  •   | S Conjunction S I feel a breeze + and + I smell a wumpus
  • NP ®  Pronoun I
  •   |      Name                 John
  •   | Noun pits
  •   | Article Noun the + wumpus
  •   | Digit Digit 3 4
  •   | NP PP the wumpus + to the east
  •   | NP RelClause the wumpus + that is smelly
12
Formal Grammar
  • The grammar for eo (continued):


  • VP®  Verb stinks
  •   | VP NP feel + a breeze
  •   | VP Adjective is + smelly
  •   | VP PP turn + to the east
  •   |  VP Adverb go + ahead
  • PP ® Preposition NP to + the east
  • RelClause® that VP that + is smelly


13
Formal Grammar
  • Parts of speech
    • Open class: noun, verb, adjective, adverb
    • Closed class: pronoun, article, preposition, conjunction, …


  • Grammar
    • Overgenerate: “Me go Boston”
    • Undergenerate: “I think the wumpus is smelly”

14
Parse Tree
15
Syntactic Analysis (Parsing)
  • Parsing: The process of finding a parse tree for a given input string
  • Top-down parsing
    • Start with the S symbol and search for a tree that has the words as its leaves
  • Bottom-up parsing
    • Start with the words and search for a tree with root S

16
Trace of Bottom-up Parsing
  • List of nodes Subsequence Rule
  • the wumpus is dead the Article ® the
  • Article wumpus is dead wumpus Noun ® wumpus
  • Article Noun is dead Article Noun NP ® Article Noun
  • NP is dead is Verb ® is
  • NP Verb dead dead Adjective ® dead
  • NP Verb Adjective Verb VP ® Verb
  • NP VP Adjective VP Adjective VP ® VP Adjective
  • NP VP NP VP S ® NP VP
  • S
17
Subjective & Objective Cases
  • Overgeneration:
    • S ® NP VP ® NP VP NP ® NP Verb NP
    • Pronoun Verb NP ® Pronoun Verb Pronoun

  • She loves him
  • *her loves he
  • She ran towards him
  • *She ran towards he
18
Handling Subjective & Objective Cases
  • S ® NPs VP | …
  • NPs ®  Pronouns | Name | Noun | …
  • NPo ®  Pronouno | Name | Noun | …
  • VP ® VP NPo | …
  • PP ® Preposition NPo
  • Pronouns ® I | you | he | she | it | …
  • Pronouno ® me | you | him | her | it | …


  • Disadvantage: Grammar size grows exponentially
19
Augmented Grammars
  • Handling case, agreement, etc
  • Augment grammar rules to allow parameters on nonterminal categories
    • NP(Subjective)
    • NP(Objective)
    • NP(case)

20
Definite Clause Grammar (DCG)
  • The grammar for e1:


  • S ® NP(Subjective) VP | …
  • NP(case) ®  Pronoun(case) | Name | Noun | …
  • VP ®  VP NP(Objective) | …
  • PP ® Preposition NP(Objective)
  • Pronoun(Subjective) ® I | you | he | she | it | …
  • Pronoun(Objective) ® me | you | him | her | it | …


21
Definite Clause Grammar (DCG)
  • Each grammar rule is a definite clause in logic:


    • S ® NP VP
    • NP(s1) Ù VP(s2) Þ S(s1 + s2)
    • NP(case) ®  Pronoun(case)
    • Pronoun(case, s1) Þ NP(case, s1)

  • DCG enables parsing as logical inference:
    • Top-down parsing is backward chaining
    • Bottom-up parsing is forward chaining
22
Verb Subcategorization
23
Verb Subcategorization
  • S ® NP(Subjective) VP([ ])
  • VP(subcat) ®  Verb(subcat)
  •   |        VP(subcat + [NP]) NP(Objective)
  •   | VP(subcat + [Adjective]) Adjective
  •   | VP(subcat + [PP]) PP
  • VP(subcat) ®  VP(subcat) PP
  •   | VP(subcat) Adverb
  • Verb([NP,NP]) ® give | hand | …


24
Parsing Using Verb Subcategorization
25
Semantic Interpretation
  • Semantics: meaning of utterances
  • First-order logic as the representation language
  • Compositional semantics: meaning of a phrase is composed of meaning of the constituent parts of the phrase


26
Semantic Interpretation
  • Exp(x) ® Exp(x1) Operator(op) Exp(x2)
  •       { x = Apply(op, x1, x2) }
  • Exp(x) ® ( Exp(x) )
  • Exp(x) ® Number(x)
  • Number(x) ® Digit(x)
  • Number(x) ® Number(x1) Digit(x2) { x = 10 ´ x1 + x2 }
  • Digit(x) ® x { 0 ≤ x ≤ 9 }
  • Operator(x) ® x { x Î { +, -, ´, ¸ }}


27
Semantic Interpretation
28
Semantic Interpretation
  • John loves Mary
  • Loves(John, Mary)


  • (ly lx Loves(x,y)) (Mary) º lx Loves(x, Mary)
  • (lx Loves(x, Mary)) (John) º Loves(John, Mary)


  • S(rel(obj)) ® NP(obj) VP(rel)
  • VP(rel(obj)) ® Verb(rel) NP(obj)
  • NP(obj) ® Name(obj)
  • Name(John) ® John
  • Name(Mary) ® Mary
  • Verb(ly lx Loves(x,y) )  ®   loves
29
Semantic Interpretation
30
Pragmatic Interpretation
  • Adding context-dependent information about the current situation to each candidate semantic interpretation


  • Indexicals: phrases that refer directly to the current situation
    • “I am in Boston today”
      • (“I” refers to speaker and “today” refers to now)

31
Language Generation
  • The same DCG can be used for parsing and generation
  • Parsing:
    • Given: S(sem, [John, loves, Mary])
    • Return: sem = Loves(John, Mary)
  • Generation:
    • Given: S(Loves(John, Mary), words)
    • Return: words = [John, loves, Mary]
32
Ambiguity
  • Lexical ambiguity
    • “the back of the room” vs. “back up your files”
    • “In the interest of stimulating the economy, the government lowered the interest rate.”
  • Syntactic ambiguity (structural ambiguity)
    • “I smelled a wumpus in 2,2”
  • Semantic ambiguity
    • “the IBM lecture”
  • Pragmatic ambiguity
    • “I’ll meet you next Friday”
33
Metonymy
  • Denotes a concept by naming some other concept closely related to it
  • Examples:
    • Company for company’s spokesperson (“IBM announced a new model”)
    • Author for author’s works (“I read Shakespeare”)
    • Producer for producer’s product (“I drive a Honda”)

34
Metonymy
  • Representation of “IBM announced”
35
Metaphor
  • Refer to concepts using words whose meanings are appropriate to other completely different kinds of concepts
  • Example: corporation-as-person metaphor:
    • Speak of a corporation as if it is a person and can experience emotions, has a mind, etc.
    • “That doesn’t scare Digital, which has grown to be the world’s second-largest computer maker.”
    • “But if the company changed its mind, however, it would do so for investment reasons, the filing said.”

36
Disambiguation
37
Discourse Understanding
  • Discourse: multiple sentences
  • Reference resolution: The interpretation of a pronoun or a definite noun phrase that refers to an object in the world
  • “John flagged down the waiter. He ordered a ham sandwich.”
    • “He” refers to “John”
  • “After John proposed to Mary, they found a preacher and got married. For the honeymoon, they went to Hawaii.”
    • “they”? “the honeymoon”?
38
Discourse Understanding
  • Structure of coherent discourse: Sentences are joined by coherence relations
  • Examples of coherence relations between S1 and S2:
    • Enable or cause:  S1 brings about a change of state that causes or enables S2
      • “I went outside. I drove to school.”
    • Explanation: the reverse of enablement, S2 causes or enables S1 and is an explanation for S1
      • “I was late for school. I overslept.”
    • Exemplification: S2 is an example of the general principle in S1
      • “This algorithm reverses a list. The input [A,B,C] is mapped to [C,B,A].”
    • Etc.