ge langua communica

57
Communication and Language Chapter 22 Chapter 22 1

Upload: others

Post on 13-May-2022

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ge Langua Communica

CommunicationandLanguage

Chapter22

Chapter221

Page 2: ge Langua Communica

Outline

♦Communication

♦Grammar

♦Syntacticanalysis

♦Problems

Chapter222

Page 3: ge Langua Communica

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

Page 4: ge Langua Communica

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

Page 5: ge Langua Communica

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

Page 6: ge Langua Communica

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

Page 7: ge Langua Communica

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

Page 8: ge Langua Communica

Stagesincommunication(informing)

IntentionSwantstoinformHthatP

GenerationSselectswordsWtoexpressPincontextC

SynthesisSutterswordsW

PerceptionHperceivesW′incontextC

AnalysisHinferspossiblemeaningsP1,...Pn

DisambiguationHinfersintendedmeaningPi

IncorporationHincorporatesPiintoKB

Howcouldthisgowrong?

Chapter228

Page 9: ge Langua Communica

Stagesincommunication(informing)

IntentionSwantstoinformHthatP

GenerationSselectswordsWtoexpressPincontextC

SynthesisSutterswordsW

PerceptionHperceivesW′incontextC

AnalysisHinferspossiblemeaningsP1,...Pn

DisambiguationHinfersintendedmeaningPi

IncorporationHincorporatesPiintoKB

Howcouldthisgowrong?–Insincerity(Sdoesn’tbelieveP)–Speechwreckignitionfailure–Ambiguousutterance–Differingunderstandingofcurrentcontext(C6=C

′)

Chapter229

Page 10: ge Langua Communica

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

Page 11: ge Langua Communica

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

Page 12: ge Langua Communica

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

Page 13: ge Langua Communica

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

Page 14: ge Langua Communica

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

Page 15: ge Langua Communica

Grammaticalityjudgements

FormallanguageL1maydifferfromnaturallanguageL2

L1L2

false positives

false negatives

AdjustingL1toagreewithL2isalearningproblem!

*thegoldgrabthewumpus*Ismellthewumpusthegold

Igivethewumpusthegold*Idonatethewumpusthegold

Intersubjectiveagreementsomewhatreliable,independentofsemantics!Realgrammars10–500pages,insufficientevenfor“proper”English

Chapter2215

Page 16: ge Langua Communica

Parsetrees

Exhibitthegrammaticalstructureofasentence

Ishootthewumpus

Chapter2216

Page 17: ge Langua Communica

Parsetrees

Exhibitthegrammaticalstructureofasentence

Ishootthewumpus

PronounVerbArticleNoun

Chapter2217

Page 18: ge Langua Communica

Parsetrees

Exhibitthegrammaticalstructureofasentence

Ishootthewumpus

PronounVerbArticleNoun

NPVPNP

Chapter2218

Page 19: ge Langua Communica

Parsetrees

Exhibitthegrammaticalstructureofasentence

Ishootthewumpus

PronounVerbArticleNoun

NPVPNP

VP

Chapter2219

Page 20: ge Langua Communica

Parsetrees

Exhibitthegrammaticalstructureofasentence

Ishootthewumpus

PronounVerbArticleNoun

NPVPNP

VP

S

Chapter2220

Page 21: ge Langua Communica

SyntaxinNLP

Mostviewsyntacticstructureasanessentialsteptowardsmeaning;“MaryhitJohn”6=“JohnhitMary”

“AndsinceIwasnotinformed—asamatteroffact,sinceIdidnotknowthattherewereexcessfundsuntilwe,ourselves,inthatcheckupafterthewholethingblewup,andthatwas,ifyou’llremember,thatwastheincidentinwhichtheattorneygeneralcametomeandtoldmethathehadseenamemothatindicatedthattherewerenomorefunds.”

Chapter2221

Page 22: ge Langua Communica

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

Page 23: ge Langua Communica

Context-freeparsing

Bottom-upparsingworksbyreplacinganysubstringthatmatchesRHSofarulewiththerule’sLHS

Efficientalgorithms(e.g.,chartparsing,Section22.3)O(n3)forcontext-free,

runatseveralthousandwords/secforrealgrammars

Context-freeparsing≡Booleanmatrixmultiplication(Lee,2002)⇒unlikelytofindfasterpracticalalgorithms

Chapter2223

Page 24: ge Langua Communica

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

Page 25: ge Langua Communica

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

Page 26: ge Langua Communica

Reallanguage

RealhumanlanguagesprovidemanyproblemsforNLP:

♦ambiguity

♦anaphora

♦indexicality

♦vagueness

♦discoursestructure

♦metonymy

♦metaphor

♦noncompositionality

Chapter2226

Page 27: ge Langua Communica

Ambiguity

Squadhelpsdogbitevictim

Chapter2227

Page 28: ge Langua Communica

Ambiguity

SquadhelpsdogbitevictimHelicopterpoweredbyhumanflies

Chapter2228

Page 29: ge Langua Communica

Ambiguity

SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermans

Chapter2229

Page 30: ge Langua Communica

Ambiguity

SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs

Chapter2230

Page 31: ge Langua Communica

Ambiguity

SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs

salad

Chapter2231

Page 32: ge Langua Communica

Ambiguity

SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs

saladabandon

Chapter2232

Page 33: ge Langua Communica

Ambiguity

SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs

saladabandonafork

Chapter2233

Page 34: ge Langua Communica

Ambiguity

SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs

saladabandonaforkafriend

Chapter2234

Page 35: ge Langua Communica

Ambiguity

SquadhelpsdogbitevictimHelicopterpoweredbyhumanfliesAmericanpushesbottleupGermansIatespaghettiwithmeatballs

saladabandonaforkafriend

Ambiguitycanbelexical(polysemy),syntactic,semantic,referential

Chapter2235

Page 36: ge Langua Communica

Anaphora

Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext

AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.

Chapter2236

Page 37: ge Langua Communica

Anaphora

Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext

AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.

Forthehoneymoon,theywenttoHawaii

Chapter2237

Page 38: ge Langua Communica

Anaphora

Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext

AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.

Forthehoneymoon,theywenttoHawaii

MarysawaringthroughthewindowandaskedJohnforit

Chapter2238

Page 39: ge Langua Communica

Anaphora

Usingpronounstoreferbacktoentitiesalreadyintroducedinthetext

AfterMaryproposedtoJohn,theyfoundapreacherandgotmarried.

Forthehoneymoon,theywenttoHawaii

MarysawaringthroughthewindowandaskedJohnforit

Marythrewarockatthewindowandbrokeit

Chapter2239

Page 40: ge Langua Communica

Indexicality

Indexicalsentencesrefertoutterancesituation(place,time,S/H,etc.)

Iamoverhere

Whydidyoudothat?

Chapter2240

Page 41: ge Langua Communica

Metonymy

Usingonenounphrasetostandforanother

I’vereadShakespeare

Chryslerannouncedrecordprofits

ThehamsandwichonTable4wantsanotherbeer

Chapter2241

Page 42: ge Langua Communica

Metaphor

“Non-literal”usageofwordsandphrases,oftensystematic:

I’vetriedkillingtheprocessbutitwon’tdie.Itsparentkeepsitalive.

Chapter2242

Page 43: ge Langua Communica

Noncompositionality

basketballshoes

Chapter2243

Page 44: ge Langua Communica

Noncompositionality

basketballshoesbabyshoes

Chapter2244

Page 45: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoes

Chapter2245

Page 46: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoes

Chapter2246

Page 47: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

Chapter2247

Page 48: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

redbook

Chapter2248

Page 49: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

redbookredpen

Chapter2249

Page 50: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

redbookredpenredhair

Chapter2250

Page 51: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

redbookredpenredhairredherring

Chapter2251

Page 52: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

redbookredpenredhairredherring

smallmoon

Chapter2252

Page 53: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

redbookredpenredhairredherring

smallmoonlargemolecule

Chapter2253

Page 54: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

redbookredpenredhairredherring

smallmoonlargemoleculemerechild

Chapter2254

Page 55: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

redbookredpenredhairredherring

smallmoonlargemoleculemerechildallegedmurderer

Chapter2255

Page 56: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

redbookredpenredhairredherring

smallmoonlargemoleculemerechildallegedmurdererrealleather

Chapter2256

Page 57: ge Langua Communica

Noncompositionality

basketballshoesbabyshoesalligatorshoesdesignershoesbrakeshoes

redbookredpenredhairredherring

smallmoonlargemoleculemerechildallegedmurdererrealleatherartificialgrass

Chapter2257