ge langua communica
TRANSCRIPT
CommunicationandLanguage
Chapter22
Chapter221
Outline
♦Communication
♦Grammar
♦Syntacticanalysis
♦Problems
Chapter222
Communication
“Classical”view(pre-1953):languageconsistsofsentencesthataretrue/false(cf.logic)
“Modern”view(post-1953):languageisaformofaction
Wittgenstein(1953)PhilosophicalInvestigations
Austin(1962)HowtoDoThingswithWords
Searle(1969)SpeechActs
Why?
Chapter223
Communication
“Classical”view(pre-1953):languageconsistsofsentencesthataretrue/false(cf.logic)
“Modern”view(post-1953):languageisaformofaction
Wittgenstein(1953)PhilosophicalInvestigations
Austin(1962)HowtoDoThingswithWords
Searle(1969)SpeechActs
Why?
Chapter224
Communication
“Classical”view(pre-1953):languageconsistsofsentencesthataretrue/false(cf.logic)
“Modern”view(post-1953):languageisaformofaction
Wittgenstein(1953)PhilosophicalInvestigations
Austin(1962)HowtoDoThingswithWords
Searle(1969)SpeechActs
Why?
Chapter225
Communication
“Classical”view(pre-1953):languageconsistsofsentencesthataretrue/false(cf.logic)
“Modern”view(post-1953):languageisaformofaction
Wittgenstein(1953)PhilosophicalInvestigations
Austin(1962)HowtoDoThingswithWords
Searle(1969)SpeechActs
Why?
Tochangetheactionsofotheragents
Chapter226
Speechacts
SITUATION
SpeakerUtteranceHearer
Speechactsachievethespeaker’sgoals:Inform“There’sapitinfrontofyou”Query“Canyouseethegold?”Command“Pickitup”Promise“I’llsharethegoldwithyou”Acknowledge“OK”
Speechactplanningrequiresknowledgeof–Situation–Semanticandsyntacticconventions–Hearer’sgoals,knowledgebase,andrationality
Chapter227
Stagesincommunication(informing)
IntentionSwantstoinformHthatP
GenerationSselectswordsWtoexpressPincontextC
SynthesisSutterswordsW
PerceptionHperceivesW′incontextC
′
AnalysisHinferspossiblemeaningsP1,...Pn
DisambiguationHinfersintendedmeaningPi
IncorporationHincorporatesPiintoKB
Howcouldthisgowrong?
Chapter228
Stagesincommunication(informing)
IntentionSwantstoinformHthatP
GenerationSselectswordsWtoexpressPincontextC
SynthesisSutterswordsW
PerceptionHperceivesW′incontextC
′
AnalysisHinferspossiblemeaningsP1,...Pn
DisambiguationHinfersintendedmeaningPi
IncorporationHincorporatesPiintoKB
Howcouldthisgowrong?–Insincerity(Sdoesn’tbelieveP)–Speechwreckignitionfailure–Ambiguousutterance–Differingunderstandingofcurrentcontext(C6=C
′)
Chapter229
Grammar
Vervetmonkeys,antelopesetc.useisolatedsymbolsforsentences⇒restrictedsetofcommunicablepropositions,nogenerativecapacity
(Chomsky(1957):SyntacticStructures)
Grammarspecifiesthecompositionalstructureofcomplexmessagese.g.,speech(linear),text(linear),music(two-dimensional)
Aformallanguageisasetofstringsofterminalsymbols
Eachstringinthelanguagecanbeanalyzed/generatedbythegrammar
Thegrammarisasetofrewriterules,e.g.,
S→NPVP
Article→the|a|an|...
HereSisthesentencesymbol,NPandVParenonterminals
Chapter2210
Grammartypes
Regular:nonterminal→terminal[nonterminal]
S→aS
S→Λ
Context-free:nonterminal→anything
S→aSb
Context-sensitive:morenonterminalsonright-handside
ASB→AAaBB
Recursivelyenumerable:noconstraints
RelatedtoPostsystemsandKleenesystemsofrewriterules
Naturallanguagesprobablycontext-free,parsableinrealtime!
Chapter2211
Wumpuslexicon
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|...
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
Chapter2212
Wumpuslexicon
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|Y′ALL...
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
Wumpusgrammar
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
Grammaticalityjudgements
FormallanguageL1maydifferfromnaturallanguageL2
L1L2
false positives
false negatives
AdjustingL1toagreewithL2isalearningproblem!
*thegoldgrabthewumpus*Ismellthewumpusthegold
Igivethewumpusthegold*Idonatethewumpusthegold
Intersubjectiveagreementsomewhatreliable,independentofsemantics!Realgrammars10–500pages,insufficientevenfor“proper”English
Chapter2215
Parsetrees
Exhibitthegrammaticalstructureofasentence
Ishootthewumpus
Chapter2216
Parsetrees
Exhibitthegrammaticalstructureofasentence
Ishootthewumpus
PronounVerbArticleNoun
Chapter2217
Parsetrees
Exhibitthegrammaticalstructureofasentence
Ishootthewumpus
PronounVerbArticleNoun
NPVPNP
Chapter2218
Parsetrees
Exhibitthegrammaticalstructureofasentence
Ishootthewumpus
PronounVerbArticleNoun
NPVPNP
VP
Chapter2219
Parsetrees
Exhibitthegrammaticalstructureofasentence
Ishootthewumpus
PronounVerbArticleNoun
NPVPNP
VP
S
Chapter2220
SyntaxinNLP
Mostviewsyntacticstructureasanessentialsteptowardsmeaning;“MaryhitJohn”6=“JohnhitMary”
“AndsinceIwasnotinformed—asamatteroffact,sinceIdidnotknowthattherewereexcessfundsuntilwe,ourselves,inthatcheckupafterthewholethingblewup,andthatwas,ifyou’llremember,thatwastheincidentinwhichtheattorneygeneralcametomeandtoldmethathehadseenamemothatindicatedthattherewerenomorefunds.”
Chapter2221
SyntaxinNLP
Mostviewsyntacticstructureasanessentialsteptowardsmeaning;“MaryhitJohn”6=“JohnhitMary”
“AndsinceIwasnotinformed—asamatteroffact,sinceIdidnotknowthattherewereexcessfundsuntilwe,ourselves,inthatcheckupafterthewholethingblewup,andthatwas,ifyou’llremember,thatwastheincidentinwhichtheattorneygeneralcametomeandtoldmethathehadseenamemothatindicatedthattherewerenomorefunds.”
“Wouldn’tthesentence’IwanttoputahyphenbetweenthewordsFishandAndandAndandChipsinmyFish-And-Chipssign’havebeenclearerifquotationmarkshadbeenplacedbeforeFish,andbetweenFishandand,andandandAnd,andAndandand,andandandAnd,andAndandand,andandandChips,aswellasafterChips?”
Chapter2222
Context-freeparsing
Bottom-upparsingworksbyreplacinganysubstringthatmatchesRHSofarulewiththerule’sLHS
Efficientalgorithms(e.g.,chartparsing,Section22.3)O(n3)forcontext-free,
runatseveralthousandwords/secforrealgrammars
Context-freeparsing≡Booleanmatrixmultiplication(Lee,2002)⇒unlikelytofindfasterpracticalalgorithms
Chapter2223
Logicalgrammars
BNFnotationforgrammarstoorestrictive:–difficulttoadd“sideconditions”(numberagreement,etc.)–difficulttoconnectsyntaxtosemantics
Idea:expressgrammarrulesaslogic
X→YZbecomesY(s1)∧Z(s2)⇒X(Append(s1,s2))X→wordbecomesX([“word”])X→Y|ZbecomesY(s)⇒X(s)Z(s)⇒X(s)
Here,X(s)meansthatstringscanbeinterpretedasanX
Chapter2224
Logicalgrammarscontd.
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
Reallanguage
RealhumanlanguagesprovidemanyproblemsforNLP:
♦ambiguity
♦anaphora
♦indexicality
♦vagueness
♦discoursestructure
♦metonymy
♦metaphor
♦noncompositionality
Chapter2226
Ambiguity
Squadhelpsdogbitevictim
Chapter2227
Ambiguity
SquadhelpsdogbitevictimHelicopterpoweredbyhumanflies
Chapter2228
Ambiguity
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermans
Chapter2229
Ambiguity
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs
Chapter2230
Ambiguity
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs
salad
Chapter2231
Ambiguity
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs
saladabandon
Chapter2232
Ambiguity
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs
saladabandonafork
Chapter2233
Ambiguity
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs
saladabandonaforkafriend
Chapter2234
Ambiguity
SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs
saladabandonaforkafriend
Ambiguitycanbelexical(polysemy),syntactic,semantic,referential
Chapter2235
Anaphora
Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext
AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.
Chapter2236
Anaphora
Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext
AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.
Forthehoneymoon,theywenttoHawaii
Chapter2237
Anaphora
Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext
AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.
Forthehoneymoon,theywenttoHawaii
MarysawaringthroughthewindowandaskedJohnforit
Chapter2238
Anaphora
Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext
AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.
Forthehoneymoon,theywenttoHawaii
MarysawaringthroughthewindowandaskedJohnforit
Marythrewarockatthewindowandbrokeit
Chapter2239
Indexicality
Indexicalsentencesrefertoutterancesituation(place,time,S/H,etc.)
Iamoverhere
Whydidyoudothat?
Chapter2240
Metonymy
Usingonenounphrasetostandforanother
I’vereadShakespeare
Chryslerannouncedrecordprofits
ThehamsandwichonTable4wantsanotherbeer
Chapter2241
Metaphor
“Non-literal”usageofwordsandphrases,oftensystematic:
I’vetriedkillingtheprocessbutitwon’tdie.Itsparentkeepsitalive.
Chapter2242
Noncompositionality
basketballshoes
Chapter2243
Noncompositionality
basketballshoesbabyshoes
Chapter2244
Noncompositionality
basketballshoesbabyshoesalligatorshoes
Chapter2245
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoes
Chapter2246
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
Chapter2247
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbook
Chapter2248
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpen
Chapter2249
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhair
Chapter2250
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
Chapter2251
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoon
Chapter2252
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoonlargemolecule
Chapter2253
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoonlargemoleculemerechild
Chapter2254
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoonlargemoleculemerechildallegedmurderer
Chapter2255
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoonlargemoleculemerechildallegedmurdererrealleather
Chapter2256
Noncompositionality
basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes
redbookredpenredhairredherring
smallmoonlargemoleculemerechildallegedmurdererrealleatherartificialgrass
Chapter2257