COMMUNICATION
Chapter 22

Outline
Communication as Action
Formal Grammar
Syntactic Analysis (Parsing)
Augmented Grammars
Semantic Interpretation
Ambiguity and Disambiguation
Discourse Understanding

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

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.”

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

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

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

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)

Component Steps of Communication
HEARER:
Disambiguation:
ØAlive(Wumpus1,S3)
Incorporation:
TELL( KB,  ØAlive(Wumpus1,S3) )

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

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

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

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”

Parse Tree

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

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

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

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

Augmented Grammars
Handling case, agreement, etc
Augment grammar rules to allow parameters on nonterminal categories
NP(Subjective)
NP(Objective)
NP(case)

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 | …

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

Verb Subcategorization

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 | …

Parsing Using Verb Subcategorization

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

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 Î { +, -, ´, ¸ }}

Semantic Interpretation

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

Semantic Interpretation

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)

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]

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”

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”)

Metonymy
Representation of “IBM announced”

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.”

Disambiguation

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”?

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.