ttic 31190: natural language processing › ~kgimpel › teaching › 31190 › lectures ›...

79
TTIC 31190: Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation and other NLP Applications

Upload: others

Post on 04-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

TTIC31190:NaturalLanguageProcessing

KevinGimpelWinter2016

Lecture16:MachineTranslation

andotherNLPApplications

Page 2: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Announcements• presentationswillactuallybe9minutesbecausewehavesomanytofitin

• Iwillpostguidelinesonthefinalprojectreport– thinkofitasashort(4-page)paper

• Iwillsendyouyourmidtermandassignment2gradestomorrow

Page 3: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Roadmap• classification• words• lexicalsemantics• languagemodeling• sequencelabeling• neuralnetworkmethodsinNLP• syntaxandsyntacticparsing• computationalsemantics• machinetranslation• otherNLPapplications

Page 4: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

AfricanNationalCongress opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

Goldstandard:AfricanNationalCongressopposes

sanctionsagainstZimbabwe

Page 5: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

AfricanNationalCongress opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

opposition tosanctionsagainstZimbabweAfricanNationalCongress

predictedtranslation

Goldstandard:AfricanNationalCongressopposes

sanctionsagainstZimbabwe

Page 6: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

AfricanNationalCongress opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

Goldstandard:AfricanNationalCongressopposes

sanctionsagainstZimbabwe

learningmovestranslationsleftorrightinthisplot

Page 7: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

AfricanNationalCongress opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

model score

BLEUscore

“ideal”model

Goldstandard:AfricanNationalCongressopposes

sanctionsagainstZimbabwe

Page 8: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

AfricanNationalCongress opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

Issue:goldstandardtranslationisoften

unreachable bythemodel

Goldstandard:AfricanNationalCongressopposes

sanctionsagainstZimbabwe

Why?limitedtranslationrules,

freetranslations,noisydata

Page 9: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

PerceptronLossgoldstandard

Page 10: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

PerceptronLoss

modelprediction

goldstandard

Page 11: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

HingeLossgoldstandard

cost-augmentedprediction

Page 12: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

PerceptronLossforMT?(Collins,2002)

reference

modelprediction

Page 13: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

RampLossMinimization

Page 14: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

RampLossMinimization

modelprediction

Page 15: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

RampLossMinimization

modelprediction

“fear”translation

Page 16: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

“Fear”RampLoss(Doetal.,2008)

modelprediction

“fear”translation

Page 17: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

“Hope”RampLoss(McAllester &Keshet,2011; Liangetal.,2006)

modelprediction

Page 18: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

modelprediction

“hope”translation

“Hope”RampLoss(McAllester &Keshet,2011; Liangetal.,2006)

Page 19: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

model score

BLEUscore

“Hope-Fear”RampLoss(Chiangetal.,2008;2009;Cherry&Foster,2012;

Chiang,2012;Gimpel &Smith,2012)

“hope”translation

“fear”translation

Page 20: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Experiments(Gimpel,2012)

Moses%BLEU Hiero %BLEU

MERT 35.9 37.0

FearRamp(awayfrombad) 34.9 34.2

HopeRamp(towardgood) 35.2 36.0

Hope-FearRamp(towardgood+awayfrombad) 35.7 37.0

averagesover8 testsetsacross3languagepairs

Whydoyouthinkthathoperampworksbetterthanfearramp?

Ithink:goingawayfromsomethingbaddoesnotnecessarilymeanthatyouaregoingtowardsomethinggood.

youmightbegoingtowardsomethingelsethat’sbad!

Page 21: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

ClassificationFrameworkforMachineTranslation

• wehavealatentvariable,sothisbecomes:

• wemaximizeoverthelatentvariableANDtheoutput!• h couldbewordalignments,phrasesegmentations/alignments,synchronousCFGderivations,etc.

inference:solve_

Page 22: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

• Forphrase-basedtranslation,searchover:– Segmentationsintophrases– Translationsforeachphrase– Orderingsofthetranslatedphrases

zimbabwe african national congresssanctions againstopposition to

ANC opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

african national congress opposes sanctions against zimbabweReference:

Page 23: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

• Forphrase-basedtranslation,searchover:– Segmentationsintophrases– Translationsforeachphrase– Orderingsofthetranslatedphrases

zimbabwe african national congresssanctions againstopposition to

ANC opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

african national congress opposes sanctions against zimbabweReference:

ThissearchproblemisNP-hard(Knight,1999)Approximatebeamsearchisusedinpractice

Page 24: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

AfricanNationalCongress opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

African National Congress opposessanctions against Zimbabwe

Reference translation:

Koehn et al. (2003)

Phrase-Based Machine Translation

Page 25: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

AfricanNationalCongress opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

African National Congress opposessanctions against Zimbabwe

Reference translation:

1 非国大 / African National Congress 2 反对 / opposition to 3 反对 / is opposed to 4 制裁 / sanctions 5 制裁 津巴布韦 /

sanctions against Zimbabwe...

Phrase TableKoehn et al. (2003)

Phrase-Based Machine Translation

Page 26: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

AfricanNationalCongress opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

African National Congress opposessanctions against Zimbabwe

Reference translation:

1 非国大 / African National Congress 2 反对 / opposition to 3 反对 / is opposed to 4 制裁 / sanctions 5 制裁 津巴布韦 /

sanctions against Zimbabwe...

Phrase Table

opposition to

African National Congress

2

1

Koehn et al. (2003)

Phrase-Based Machine Translation

Page 27: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

AfricanNationalCongress opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

African National Congress opposessanctions against Zimbabwe

Reference translation:

1 非国大 / African National Congress 2 反对 / opposition to 3 反对 / is opposed to 4 制裁 / sanctions 5 制裁 津巴布韦 /

sanctions against Zimbabwe...

Phrase Table

opposition toopposition to sanctions

against Zimbabwe

African National Congress

African National Congressis opposed to

2 5

3

1

Koehn et al. (2003)

Phrase-Based Machine Translation

Page 28: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

AfricanNationalCongress opposition sanction Zimbabwe

非国大 反对 制裁 津巴布韦

African National Congress opposessanctions against Zimbabwe

Reference translation:

1 非国大 / African National Congress 2 反对 / opposition to 3 反对 / is opposed to 4 制裁 / sanctions 5 制裁 津巴布韦 /

sanctions against Zimbabwe...

Phrase Table

opposition to sanctionsagainst Zimbabwe

African National Congress

1opposition to

opposition to sanctionsagainst Zimbabwe

African National Congress

African National Congressis opposed to

2 5

3

1

Koehn et al. (2003)

Phrase-Based Machine Translation

Page 29: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

zimbabwe african national congresssanctions againstopposition to

zimbabwe african national congresssanctions onopposition to

zimbabwe african national congress sanctionsopposition to

zimbabweafrican national congress sanctions againstopposition to

zimbabweafrican national congress sanctions againstoppose

1

2

3

4

5

otherusefulinferencetasks:• findk-besttranslations

-11.8

-12.1

-12.4

-12.9

-13.5

Rank Score

Page 30: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

typicallatticescontainupto1080 paths!(butnotallareuniquetranslations)

zimbabwe

zimbabwe

zimbabwe

african national congress

african national congress

african national congress

african national assemblyafricannationalcongress

sanctions against

sanctions on

sanctions against

sanctions

sanctions against

opposition to

opposition to

opposition tozimbabwe

is opposed to

otherusefulinferencetasks:• findphraselatticeoftranslations

Page 31: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

NeuralNetworksandMachineTranslation

• currenttrendinMTresearchistouseneuralnetworksforeverything

• “neuralMT”typicallyreferstoapproachesthatonlyuseneuralnetworks

• butmostMTsystemscombinetraditionalphrase-basedmodelswithfeaturesbasedonneuralnetworks

Page 32: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

ACL2014(bestpaperaward)

Page 33: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

ACL2014

Page 34: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

ACL2014

Page 35: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

NeuralMT

Page 36: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

EMNLP2013

Page 37: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

EMNLP2013

Page 38: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

EMNLP2014

Page 39: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

EMNLP2014

Page 40: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

NIPS2014

Page 41: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

NIPS2014

Page 42: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

NIPS2014

Page 43: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

ICLR2015

Page 44: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

ICLR2015

Page 45: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

ICLR2015

Page 46: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

OtherNLPTasksandApplications• coreference resolution• questionanswering• summarization• dialoguesystems

Page 47: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

OtherNLPTasksandApplications• coreference resolution• questionanswering• summarization• dialoguesystems

Page 48: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Coreference Resolution• determinewhichpiecesoftextrefertothesamereferent:– PresidentObamaselectedtendelegatesafterreceivingrecommendationsfromhis cabinetmembers.They spentalldaySaturdayworkingontheir recommendationsforhim.

Page 49: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

OtherNLPTasksandApplications• coreference resolution• questionanswering

– factoidquestionanswering– machinecomprehension

• summarization• dialoguesystems

Page 50: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

IBM’sWatson

Page 51: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

IBM’sWatson

Page 52: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

ClassifyingQuestionsinto“LexicalAnswerTypes”

Page 53: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

OtherNLPTasksandApplications• coreference resolution• questionanswering• summarization• dialoguesystems

Page 54: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

AutomaticSummarization• givenadocument,produceasummaryofaprovidedlength

• vastmajorityofsystemsareextractive:theyextractcontentfromthedocument– thisissafer,sincethedocumentispresumablygrammatical

– butthislimitsapplicability• somework,especiallyrecently,thattriestodoabstractivesummarization– typicallybasedonintermediatesemanticrepresentationsorneuralnetworks

Page 55: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

baseline=takefirst100wordsofdocument

regarding thefirsttwoyearsofDUC:

AAAI2005

Page 56: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

MachineComprehensionCanamachinereadadocumentand

answerquestionsaboutit?

Page 57: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

57

Page 58: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

58

• 660fictionalstories,writtenata4th gradereadinglevel

• 4multiplechoicequestionsperstory

Page 59: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

OncetherewasaboynamedFritzwholovedtodraw.Hedreweverything.Inthemorning,hedrewapictureofhiscerealwithmilk.Hispapasaid,“Don’tdrawyourcereal.Eatit!”Afterschool,Fritzdrewapictureofhisbicycle.Hisunclesaid,“Don'tdrawyourbicycle.Rideit!”…

59

Page 60: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

OncetherewasaboynamedFritzwholovedtodraw.Hedreweverything.Inthemorning,hedrewapictureofhiscerealwithmilk.Hispapasaid,“Don’tdrawyourcereal.Eatit!”Afterschool,Fritzdrewapictureofhisbicycle.Hisunclesaid,“Don'tdrawyourbicycle.Rideit!”…

WhatdidFritzdrawfirst?A)thetoothpasteB)hismamaC)cerealandmilkD)hisbicycle

60

Page 61: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

OncetherewasaboynamedFritzwholovedtodraw.Hedreweverything.Inthemorning,hedrewapictureofhiscerealwithmilk.Hispapasaid,“Don’tdrawyourcereal.Eatit!”Afterschool,Fritzdrewapictureofhisbicycle.Hisunclesaid,“Don'tdrawyourbicycle.Rideit!”…

WhatdidFritzdrawfirst?A)thetoothpasteB)hismamaC)cerealandmilkD)hisbicycle

61

Page 62: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

OncetherewasaboynamedFritzwholovedtodraw.Hedreweverything.Inthemorning,hedrewapictureofhiscerealwithmilk.Hispapasaid,“Don’tdrawyourcereal.Eatit!”Afterschool,Fritzdrewapictureofhisbicycle.Hisunclesaid,“Don'tdrawyourbicycle.Rideit!”…

WhatdidFritzdrawfirst?A)thetoothpasteB)hismamaC)cerealandmilkD)hisbicycleE)everything

62

Page 63: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

63

JamestheTurtlewasalwaysgettingintrouble.…

Whatisthenameofthetroublemakingturtle?A)FriesB)PuddingC)JamesD)Jane

• Somequestionsaremucheasier

• Simplewordoverlapbaselinegets63%correct

Page 64: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

64

institution year accuracy(%)

TTI-Chicago 2015 69.9

CarnegieMellon 2015 67.8

UniversityCollegeLondon 2015 66.0

MIT 2015 63.8

Microsoft Research 2013 63.3

MCTest Leaderboard

Page 65: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing– framesemanticparsing– coreference– wordembeddings

65

Page 66: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing

66

Page 67: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing

67

outputofStanforddependencyparser

Page 68: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing

68

FritzdrawXfirst

Page 69: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing

69

FritzdrawXfirst

FritzdrawthetoothpastefirstFritz draw his mama firstFritz draw cereal and milk firstFritz draw his bicycle first

Page 70: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing– framesemanticparsing

70

Page 71: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing– framesemanticparsing

71

outputofCarnegieMellonframesemanticparser

Page 72: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing– framesemanticparsing

72

Page 73: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing– framesemanticparsing

73

Page 74: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing– framesemanticparsing– coreference

74

Page 75: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing– framesemanticparsing– coreference

75

outputofStanfordcoreference resolutionsystem

Page 76: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

Oursystemusesseveraltypesofautomaticlinguisticanalysis:

– dependencyparsing– framesemanticparsing– coreference– wordembeddings

76

Page 77: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

OncetherewasaboynamedFritz wholovedtodraw.Hedreweverything.Inthemorning,hedrewapictureofhiscerealwithmilk.Hispapasaid,“Don’tdrawyourcereal.Eatit!”…WhatdidFritzdrawfirst?

77

Page 78: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

OncetherewasaboynamedFritz wholovedtodraw.Hedreweverything.Inthemorning,hedrewapictureofhiscerealwithmilk.Hispapasaid,“Don’tdrawyourcereal.Eatit!”…WhatdidFritzdrawfirst?

transformedquestion(usingdependencyparsing):Fritzdrawcerealandmilkfirst

Fritz≈he (coreference,framesemantics)draw≈drew (wordembeddings,framesemantics)withmilk≈andmilk (wordembeddings)

78

Page 79: TTIC 31190: Natural Language Processing › ~kgimpel › teaching › 31190 › lectures › 16.… · Natural Language Processing Kevin Gimpel Winter 2016 Lecture 16: Machine Translation

RemovingFeaturesOneataTime

69.9

67.667.9

68.4 68.3

64

65

66

67

68

69

70

71

72

allfeatures

removedependencyparsing

removeframesemantics

removecoreference

removeembeddings

Accuracy