Communica tion and Langua ge
Chapter22
Chapter221
Outline
♦Communication
♦Grammar
♦Syntacticanalysis
♦Problems
Chapter222
Comm unication
“Classical”view(pre-1953):languageconsistsofsentencesthataretrue/false(cf.logic)
“Modern”view(post-1953):languageisaformofaction
Wittgenstein(1953)PhilosophicalInvestigationsAustin(1962)HowtoDoThingswithWordsSearle(1969)SpeechActs
Why?
Chapter223
Comm unication
“Classical”view(pre-1953):languageconsistsofsentencesthataretrue/false(cf.logic)
“Modern”view(post-1953):languageisaformofaction
Wittgenstein(1953)PhilosophicalInvestigationsAustin(1962)HowtoDoThingswithWordsSearle(1969)SpeechActs
Why?
Chapter224
Comm unication
“Classical”view(pre-1953):languageconsistsofsentencesthataretrue/false(cf.logic)
“Modern”view(post-1953):languageisaformofaction
Wittgenstein(1953)PhilosophicalInvestigationsAustin(1962)HowtoDoThingswithWordsSearle(1969)SpeechActs
Why?
Chapter225
Comm unication
“Classical”view(pre-1953):languageconsistsofsentencesthataretrue/false(cf.logic)
“Modern”view(post-1953):languageisaformofaction
Wittgenstein(1953)PhilosophicalInvestigationsAustin(1962)HowtoDoThingswithWordsSearle(1969)SpeechActs
Why?
Tochangetheactionsofotheragents
Chapter226
Sp eec h acts
SITUATION
Speaker Utterance Hearer
Speechactsachievethespeaker’sgoals:Inform“There’sapitinfrontofyou”Query“Canyouseethegold?”Command“Pickitup”Promise“I’llsharethegoldwithyou”Acknowledge“OK”
Speechactplanningrequiresknowledgeof–Situation–Semanticandsyntacticconventions–Hearer’sgoals,knowledgebase,andrationality
Chapter227
Stages in comm unication (informing)
IntentionSwantstoinformHthatPGenerationSselectswordsWtoexpressPincontextCSynthesisSutterswordsW
PerceptionHperceivesW0incontextC0
AnalysisHinferspossiblemeaningsP1,...PnDisambiguationHinfersintendedmeaningPiIncorporationHincorporatesPiintoKB
Howcouldthisgowrong?
Chapter228
Stages in comm unication (informing)
IntentionSwantstoinformHthatPGenerationSselectswordsWtoexpressPincontextCSynthesisSutterswordsW
PerceptionHperceivesW0incontextC0
AnalysisHinferspossiblemeaningsP1,...PnDisambiguationHinfersintendedmeaningPiIncorporationHincorporatesPiintoKB Howcouldthisgowrong?–Insincerity(Sdoesn’tbelieveP)–Speechwreckignitionfailure–Ambiguousutterance–Differingunderstandingofcurrentcontext(C6=C0)
Chapter229
Grammar
Vervetmonkeys,antelopesetc.useisolatedsymbolsforsentences⇒restrictedsetofcommunicablepropositions,nogenerativecapacit(Chomsky(1957):SyntacticStructures)
Grammarspecifiesthecompositionalstructureofcomplexmessagese.g.,speech(linear),text(linear),music(two-dimensional)
Aformallanguageisasetofstringsofterminalsymbols
Eachstringinthelanguagecanbeanalyzed/generatedbythegrammar
Thegrammarisasetofrewriterules,e.g.,
S→NPVPArticle→the|a|an|...
HereSisthesentencesymbol,NPandVParenonterminals
Chapter22
Grammar typ es
Regular:nonterminal→terminal[nonterminal]
S→aSS→Λ
Context-free:nonterminal→anything
S→aSb
Context-sensitive:morenonterminalsonright-handside
ASB→AAaBB
Recursivelyenumerable:noconstraints
RelatedtoPostsystemsandKleenesystemsofrewriterules
Naturallanguagesprobablycontext-free,parsableinrealtime!
Chapter22
W umpus lexicon
Noun→stench|breeze|glitter|nothing|wumpus|pit|pits|gold|east|...Verb→is|see|smell|shoot|feel|stinks|go|grab|carry|kill|turn|...Adjective→right|left|east|south|back|smel
Adverb→here|there|nearby|ahead|right|left|east|south|back|...Pronoun→me|you|I|it|...Name→John|Mary|Boston|UCB|PAJCArticle→the|a|an|...Preposition→to|in|on|near|...Conjunction→and|or|but|...
Digit→0|1|2|3|4|5|6|7|8|9
Dividedintoclosedandopenclasses
Chapter22
W umpus lexicon
Noun→stench|breeze|glitter|nothing|wumpus|pit|pits|gold|east|...Verb→is|see|smell|shoot|feel|stinks|go|grab|carry|kill|turn|...Adjective→right|left|east|south|back|smelly|...
Adverb→here|there|nearby|ahead|right|left|east|south|back|...Pronoun→me|you|I|it|S/HE|Y0ALL...Name→John|Mary|Boston|UCB|PAJC|...Article→the|a|an|...Preposition→to|in|on|near|...Conjunction→and|or|but|...
Digit→0|1|2|3|4|5|6|7|8|9
Dividedintoclosedandopenclasses
Chapter2213
W umpus grammar
S→NPVPI+feelabreeze|SConjunctionSIfeelabreeze+and+Ismellawumpus
NP→PronounI|Nounpits|ArticleNounthe+wumpus|DigitDigit34|NPPPthewumpus+totheeast|NPRelClausethewumpus+thatissmelly
VP→Verbstinks|VPNPfeel+abreeze|VPAdjectiveis+smelly|VPPPturn+totheeast|VPAdverbgo+ahead
PP→PrepositionNPto+theeastRelClause→thatVPthat+issmelly
Chapter2214
Grammaticalit y judgemen ts
FormallanguageL1maydifferfromnaturallanguageL2
L1L2 false positives false negatives AdjustingL1toagreewithL2isalearningproblem!
*thegoldgrabthewumpus*IsmellthewumpusthegoldIgivethewumpusthegold*Idonatethewumpusthegold
Intersubjectiveagreementsomewhatreliable,independentofsemantics!Realgrammars10–500pages,insufficientevenfor“proper”English
Chapter2215
P arse trees
Exhibitthegrammaticalstructureofasentence
Ishootthewumpus
Chapter2216
P arse trees
Exhibitthegrammaticalstructureofasentence
Ishootthewumpus PronounVerbArticleNoun
Chapter2217
P arse trees
Exhibitthegrammaticalstructureofasentence
Ishootthewumpus PronounVerbArticleNoun NPVPNP
Chapter2218
P arse trees
Exhibitthegrammaticalstructureofasentence
Ishootthewumpus PronounVerbArticleNoun NPVPNP VP
Chapter2219
P arse trees
Exhibitthegrammaticalstructureofasentence
Ishootthewumpus PronounVerbArticleNoun NPVPNP VP S
Chapter2220
Syn tax in NLP
Mostviewsyntacticstructureasanessentialsteptowardsmeaning;“MaryhitJohn”6=“JohnhitMary”
“AndsinceIwasnotinformed—asamatteroffact,sinceIdidnotknowthattherewereexcessfundsuntilwe,ourselves,inthatcheckupafterthewholethingblewup,andthatwas,ifyou’llremember,thatwastheincidentinwhichtheattorneygeneralcametomeandtoldmethathehadseenamemothatindicatedthattherewerenomorefunds.”
Chapter2221
Syn tax in NLP
Mostviewsyntacticstructureasanessentialsteptowardsmeaning;“MaryhitJohn”6=“JohnhitMary”
“AndsinceIwasnotinformed—asamatteroffact,sinceIdidthattherewereexcessfundsuntilwe,ourselves,inthatcheckupwholethingblewup,andthatwas,ifyou’llremember,thatwastheinwhichtheattorneygeneralcametomeandtoldmethathehadmemothatindicatedthattherewerenomorefunds.”
“Wouldn’tthesentence’IwanttoputahyphenbetweenthewandAndandAndandChipsinmyFish-And-Chipssign’havebeenifquotationmarkshadbeenplacedbeforeFish,andbetweenFishandandandAnd,andAndandand,andandandAnd,andAndandandandChips,aswellasafterChips?”
Con text-free parsing
Bottom-upparsingworksbyreplacinganysubstringthatmatchesRHSofarulewiththerule’sLHS
Efficientalgorithms(e.g.,chartparsing,Section22.3)O(n3)forcontext-free,runatseveralthousandwords/secforrealgrammars
Context-freeparsing≡Booleanmatrixmultiplication(Lee,2002)⇒unlikelytofindfasterpracticalalgorithms
Logical grammars
BNFnotationforgrammarstoorestrictive:–difficulttoadd“sideconditions”(numberagreement,etc.)–difficulttoconnectsyntaxtosemantics
Idea:expressgrammarrulesaslogic
X→YZbecomesY(s1)∧Z(s2)⇒X(Append(s1,sX→wordbecomesX([“word”])X→Y|ZbecomesY(s)⇒X(s)Z(s)⇒X(s)
Here,X(s)meansthatstringscanbeinterpretedasanX
Logical grammars con td.
Nowit’seasytoaugmenttherules
NP(s1)∧EatsBreakfast(Ref(s1))∧VP(s2)⇒NP(Append(s1,[“who”],s2)) NP(s1)∧Number(s1,n)∧VP(s2)∧Number(s2,n)⇒S(Append(s1,s2))
Parsingisreducedtologicalinference:
Ask(KB,S([“I”“am”“a”“wumpus”]))(Canaddextraargumentstoreturntheparsestructure,semantics)
Generationsimplyrequiresaquerywithuninstantiatedvariables:
Ask(KB,S(x))
Ifweaddargumentstononterminalstoconstructsentencesemantics,NLPgenerationcanbedonefromagivenlogicalsentence:
Ask(KB,S(x,At(Robot,[1,1]))
Chapter2225
Real language
RealhumanlanguagesprovidemanyproblemsforNLP:
♦ambiguity
♦anaphora
♦indexicality
♦vagueness
♦discoursestructure
♦metonymy
♦metaphor
♦noncompositionality
Chapter2226
Am biguit y
Squadhelpsdogbitevictim
Chapter2227
Am biguit y
SquadhelpsdogbitevictimHelicopterpoweredbyhumanflies
Chapter2228
Am biguit y
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermans
Chapter2229
Am biguit y
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs
Chapter2230
Am biguit y
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballssalad
Chapter2231
Am biguit y
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballssaladabandon
Chapter2232
Am biguit y
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballssaladabandonafork
Chapter2233
Am biguit y
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballssaladabandonaforkafriend
Am biguit y
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballssaladabandonaforkafriend
Ambiguitycanbelexical(polysemy),syntactic,semantic,referential
Anaphora
Usingpronounstoreferbacktoentitiesalreadyintroducedinthe
AfterMaryproposedtoJohn,theyfoundapreacherandgotma
Anaphora
Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext
AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.
Forthehoneymoon,theywenttoHawaii
Chapter2237
Anaphora
Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext
AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.
Forthehoneymoon,theywenttoHawaii
MarysawaringthroughthewindowandaskedJohnforit
Chapter2238
Anaphora
Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext
AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.
Forthehoneymoon,theywenttoHawaii
MarysawaringthroughthewindowandaskedJohnforit
Marythrewarockatthewindowandbrokeit
Chapter2239
Indexicalit y
Indexicalsentencesrefertoutterancesituation(place,time,S/H,etc.)
Iamoverhere
Whydidyoudothat?
Chapter2240
Meton ym y
Usingonenounphrasetostandforanother
I’vereadShakespeare
Chryslerannouncedrecordprofits
ThehamsandwichonTable4wantsanotherbeer
Chapter2241
Metaphor
“Non-literal”usageofwordsandphrases,oftensystematic:
I’vetriedkillingtheprocessbutitwon’tdie.Itsparentkeepsitalive.
Chapter2242
Noncomp ositionalit y
basketballshoes
Chapter2243
Noncomp ositionalit y
basketballshoesbabyshoes
Chapter2244
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoes
Chapter2245
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoes
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbook
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpen
Chapter2249
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhair
Chapter2250
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
Chapter2251
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoon
Chapter2252
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoonlargemolecule
Chapter2253
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoonlargemoleculemerechild
Chapter2254
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoonlargemoleculemerechildallegedmurderer
Chapter2255
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoonlargemoleculemerechildallegedmurdererrealleather
Chapter2256
Noncomp ositionalit y
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoonlargemoleculemerechildallegedmurdererrealleatherartificialgrass
Chapter2257