Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out...

55
DCS 530 SECTION ON NATURAL LANGUAGE UNDERSTANDING JAMES ALLEN FALL, 2017

Transcript of Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out...

Page 1: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

DCS 530SECTION ON NATURAL LANGUAGE UNDERSTANDING

JAMES ALLEN

FALL, 2017

Page 2: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

Page 3: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

REFERENCE TO OBJECTS

IS THE FUNCTION OF NOUN PHRASES

Page 4: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

REFERENCE TO OBJECTS

IS THE FUNCTION OF NOUN PHRASES

Page 5: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

REFERENCE TO OBJECTS

IS THE FUNCTION OF NOUN PHRASES

Page 6: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

REFERENCE TO OBJECTS

IS THE FUNCTION OF NOUN PHRASES

PRONOUNSOFTENREFER

INDIRECTLY

Page 7: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

[THE HAPPY DOG] RAN IN [THE FIELD] WITH [[ITS] TONGUE] HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

REFERENCE TO EVENTS

IS THE FUNCTION OF VERB PHRASES

EVENTS DESCRIBETHE WORLD OVER TIME

Page 8: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

[THE HAPPY DOG] RAN IN [THE FIELD] WITH [[ITS] TONGUE] HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

REFERENCE TO EVENTS

IS THE FUNCTION OF VERB PHRASES

EVENTS DESCRIBETHE WORLD OVER TIME

Page 9: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

[THE HAPPY DOG] RAN IN [THE FIELD] WITH [[ITS] TONGUE] HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

EVENTS ARE STRUCTURED

EVENTS DESCRIBETHE WORLD OVER TIME

THE AGENTDOING THE RUNNING

THE OBJECTTHAT IS

HANGING OUT

Page 10: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

[THE HAPPY DOG] RAN IN [THE FIELD] WITH [[ITS] TONGUE] HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

PREPOSITIONS (OR ADVERBS)

RELATE EVENTS TO THEIR

ARGUMENTS

EVENTS DESCRIBETHE WORLD OVER TIME

THE RUNNINGIS LOCATED

WITHIN THE FIELD

THE RUNNINGCO-OCCURS WITH

THE TONGUE-HANGING-OUT

EVENT

Page 11: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

[THE HAPPY DOG] RAN IN [THE FIELD] WITH [[ITS] TONGUE] HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

STRUCTURAL AMBIGUITY

TO DETERMINEINTENDED MEANING

WE MUST DECIDEWHAT MODIFIES

WHAT

THE RUNNINGCO-OCCURS WITH

THE TONGUE-HANGING-OUT

EVENT

Page 12: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

[THE HAPPY DOG] RAN IN [THE FIELD] WITH [[ITS] TONGUE] HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

STRUCTURAL AMBIGUITY

TO DETERMINEINTENDED MEANING

WE MUST DECIDEWHAT MODIFIES

WHAT

THE FIELDCO-OCCURS WITH

TONGUE-HANGING-OUT

EVENT

THE RUNNINGCO-OCCURS WITH

THE TONGUE-HANGING-OUT

EVENT

Page 13: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

[THE HAPPY DOG] RAN IN [THE FIELD] WITH [[ITS] TONGUE] HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

STRUCTURAL AMBIGUITY

TO DETERMINEINTENDED MEANING

WE MUST DECIDEWHAT MODIFIES

WHAT

THE FIELDCO-OCCURS WITH

TONGUE-HANGING-OUT

EVENT

THE RUNNINGCO-OCCURS WITH

THE TONGUE-HANGING-OUT

EVENT

COMPARE: THE DOG RAN IN THE FIELD WITH THE WEEDS GROWING TALL

Page 14: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

[THE HAPPY DOG] RAN IN [THE FIELD] WITH [[ITS] TONGUE] HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

THIS SENTENCE DESCRIBES

A PROPOSITION ABOUT THE

WORLD

PROPOSITIONS ARE CLAIMS THAT

CAN BE TRUE OR FALSE

Page 15: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

[THE HAPPY DOG] RAN IN [THE FIELD] WITH [[ITS] TONGUE] HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

THIS SENTENCE DESCRIBES

A PROPOSITION ABOUT THE

WORLD

PROPOSITIONS ARE CLAIMS THAT

CAN BE TRUE OR FALSE

[RAN :AGENT [THE HAPPY DOG] :LOCATION [IN [THE FIELD]] :MANNER [WITH [HANGING-OUT :AFFECTED [[ITS] TONGUE]

Page 16: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

LANGUAGE STRUCTURE AND FUNCTION

SPEECH ACTS ARE ACTIONS AND

MAY SUCCEED ORFAIL

A SPEECH ACT INVOLVES A

SPEAKER RELATING A

PROPOSITION TO THE WORLD

Page 17: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

LANGUAGE STRUCTURE AND FUNCTION

SPEECH ACTS ARE ACTIONS AND

MAY SUCCEED ORFAIL

AN INFORM ACT CLAIMS A PROPOSITION IS TRUE: THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

A SPEECH ACT INVOLVES A

SPEAKER RELATING A

PROPOSITION TO THE WORLD

Page 18: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

LANGUAGE STRUCTURE AND FUNCTION

SPEECH ACTS ARE ACTIONS AND

MAY SUCCEED ORFAIL

AN INFORM ACT CLAIMS A PROPOSITION IS TRUE: THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

A SPEECH ACT INVOLVES A

SPEAKER RELATING A

PROPOSITION TO THE WORLD

A QUERY ACT ASKS IF A PROPOSITION IS TRUE DID THE HAPPY DOG RUN IN THE FIELD WITH ITS TONGUE HANGING OUT?

Page 19: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

LANGUAGE STRUCTURE AND FUNCTION

SPEECH ACTS ARE ACTIONS AND

MAY SUCCEED ORFAIL

AN INFORM ACT CLAIMS A PROPOSITION IS TRUE: THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

A SPEECH ACT INVOLVES A

SPEAKER RELATING A

PROPOSITION TO THE WORLD

A QUERY ACT ASKS IF A PROPOSITION IS TRUE DID THE HAPPY DOG RUN IN THE FIELD WITH ITS TONGUE HANGING OUT?

A REQUEST/COMMAND ACT TRIES TO MAKE A PROPOSITION TRUE (TO FIDO) RUN IN THE FIELD WITH YOUR TONGUE HANGING OUT!

Page 20: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

DETAILS:DETERMINERS

DETERMINERSINDICATE

QUANTITIES AND

UNIQUENESSOF THE

REFERRINGEXPRESSION

THE INDICATESTHE OBJECT IS UNIQUE

INCONTEXT

Page 21: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

DETAILS:DETERMINERS

DETERMINERSINDICATE

QUANTITIES AND

UNIQUENESSOF THE

REFERRINGEXPRESSION

THE INDICATESTHE OBJECT IS UNIQUE

INCONTEXT

POSSESSIVES INDICATESTHE OBJECT IS UNIQUE WITH

RESPECT TO ANOTHER NOUN PHRASE

“THE”, “A”, “SOME”,“MANY”, “A FEW”,

“BOTH”, “NO”,“SEVERAL”, “TWO”,

“A HUNDRED”

Page 22: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

DETAILS: ADJECTIVES

ADJECTIVESINDICATE

PROPERTIESOF THE

REFERRINGEXPRESSION

HAPPY IS AN IMPORTANT PROPERTY OF THE DOG IN THIS

CONTEXT

Page 23: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

S

NP VP

VP PP

VP PP

THE HAPPY DOG

RANTHE FIELD

HANGING OUT

ADV NP

ADV S

IN

WITH NP VP

ITS TONGUE

REPRESENTING STRUCTURE: CONTEXT FREE GRAMMAR

Page 24: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

REPRESENTING STRUCTURE: DEPENDENCY PARSES (NLP.STANFORD.EDU:8080/CORENLP)

STANFORD CORENLP TOOLS

Page 25: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND FUNCTION

REPRESENTING STRUCTURE: DEPENDENCY PARSES (NLP.STANFORD.EDU:8080/CORENLP)

BUT IT GETS THE COREFERENCE WRONG ....

STANFORD CORENLP TOOLS

Page 26: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND KNOWLEDGE

DECISIONS AFFECTING AMBIGUITY

[RAN :AGENT [THE HAPPY DOG] :LOCATION [IN [THE FIELD]] :MANNER [WITH [HANGING-OUT :AFFECTED [[ITS] TONGUE]

IS IT

OR[RAN :AGENT [THE HAPPY DOG] :LOCATION [IN [THE FIELD :CONTAINS [WITH [HANGING-OUT :AFFECTED [[ITS] TONGUE]

COMPARE: THE DOG RAN IN THE FIELD WITH THE WEEDS GROWING TALL

Page 27: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND KNOWLEDGE

DECISIONS AFFECTING AMBIGUITY

[RAN :AGENT [THE HAPPY DOG] :LOCATION [IN [THE FIELD]] :MANNER [WITH [HANGING-OUT :AFFECTED [[ITS] TONGUE]

IS IT

OR[RAN :AGENT [THE HAPPY DOG] :LOCATION [IN [THE FIELD :CONTAINS [WITH [HANGING-OUT :AFFECTED [[ITS] TONGUE]

COMPARE: THE DOG RAN IN THE FIELD WITH THE WEEDS GROWING TALL

DECISIONS THAT AFFECT THIS(1) STRUCTURE: DOES THE “WITH” ADVERBIAL MODIFY “RUN” OR “FIELD”(2) REFERENCE: DOES “IT” REFER TO THE DOG OR THE FIELD?(3) WORD SENSES: DOES “WITH” MEAN “MANNER” OR “CONTAINS”?

Page 28: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND KNOWLEDGE

WHAT KNOWLEDGE HELPS RESOLVE AMBIGUITY?

COMPARE: THE DOG RAN IN THE FIELD WITH THE WEEDS GROWING TALL

DECISIONS AFFECTING INTERPRETATION (1) DOES THE “WITH” ADVERBIAL MODIFY

“RUN” OR “FIELD”(2) DOES “IT” REFER TO THE DOG OR THE

FIELD?(3) DOES “FIELD” MEAN “A LOCATION” OR

“AN ACADEMIC DISCIPLINE”?4) DOES “HANG OUT” MEAN “SUSPENDED”

OR “GATHER SOCIALLY”?

Page 29: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

THE HAPPY DOG RAN IN THE FIELD WITH ITS TONGUE HANGING OUT

LANGUAGE STRUCTURE AND KNOWLEDGE

WHAT KNOWLEDGE HELPS RESOLVE AMBIGUITY?

COMPARE: THE DOG RAN IN THE FIELD WITH THE WEEDS GROWING TALL

DECISIONS AFFECTING INTERPRETATION (1) DOES THE “WITH” ADVERBIAL MODIFY

“RUN” OR “FIELD”(2) DOES “IT” REFER TO THE DOG OR THE

FIELD?(3) DOES “FIELD” MEAN “A LOCATION” OR

“AN ACADEMIC DISCIPLINE”?4) DOES “HANG OUT” MEAN “SUSPENDED”

OR “GATHER SOCIALLY”?

(1) DOGS HAVE TONGUES,(2) FIELDS DON’T HAVE TONGUES(3) TONGUES OFTEN HANG OUT OF DOG’S MOUTHS(4) TONGUES CAN’T HANG OUT OF A FIELD(5) TONGUES CAN’T HANG OUT SOCIALLY! (ONLY PEOPLE CAN)(6) RUNNING TYPICALLY HAPPENS IN LOCATIONS, AND NOT IN ACADEMIC DISCIPLINES (E.G., THE FIELD OF COMPUTER SCIENCE)

Page 30: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

LANGUAGE STRUCTURE AND KNOWLEDGE

WHAT KNOWLEDGE HELPS RESOLVE AMBIGUITY?

I. The trophy would not fit in the brown suitcase because it was too big. What was too big?Answer 0: the trophyAnswer 1: the suitcase

(1) IF SOMETHING FITS IN SOMETHING OF SIZE X, THEN IT WOULD FIT IN SOMETHING LARGER THAN X(2) BEING TOO BIG IS A COMMON REASON WHY SOMETHING DOESN’T FIT

THE WINOGRAD CHALLENGE(COMMONSENSEREASONING.ORG/WINOGRAD.HTML)

Page 31: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

LANGUAGE STRUCTURE AND KNOWLEDGE

WHAT KNOWLEDGE HELPS RESOLVE AMBIGUITY?

I. The trophy would not fit in the brown suitcase because it was too big. What was too big?Answer 0: the trophyAnswer 1: the suitcase

(1) IF SOMETHING FITS IN SOMETHING OF SIZE X, THEN IT WOULD FIT IN SOMETHING LARGER THAN X(2) BEING TOO BIG IS A COMMON REASON WHY SOMETHING DOESN’T FIT

THE WINOGRAD CHALLENGE(COMMONSENSEREASONING.ORG/WINOGRAD.HTML)

II. The town councilors refused to give the demonstrators a permit because they feared violence. Who feared violence? Answer 0: the town councilorsAnswer 1: the angry demonstrators

(1) TYPICALLY, A GOOD REASON TO REFUSE SOMETHING IS BECAUSE YOU FEAR SOME CONSEQUENCE(2).....

Page 32: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

LANGUAGE STRUCTURE AND KNOWLEDGE

WHAT KNOWLEDGE HELPS RESOLVE AMBIGUITY?

in a supermarket...

customer. Black beans?clerk: On aisle three

(1) CUSTOMERS ARE TYPICALLY TRYING FIND AND BUY PRODUCTS(2) CLERK & CUSTOMER DON’T KNOW EACH OTHER

INTENTION EXAMPLES

in a supermarket

customer. Black beans?partner: No we had too many last week.

(1) WE HAD A LOT OF BLACK BEANS LAST WEEK(2) WE HAVE NO BLACK BEANS IN THE CART YET

Page 33: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

BUT UNDERSTANDING REQUIRES CONTEXT!

At a grocery store ...Customer: black beans?clerk: aisle 3.

When arriving home ...Spouse: black beans?You: Oh, sorry, I forget to get them.

BUT IN A HOME ENVIRONMENT...

When cooking ...Spouse: black beans?You: in the cupboard.

When cooking (adding black beans to a pot) ...Spouse: black beans?You: don’t you like them.

When exploring nutrition options ...Spouse: black beans?You: 227 calories in a cup

DEEP UNDERSTANDINGREQUIRES INTENTION

RECOGNITION IN CONTEXT

Page 34: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

SYNTAXTHE STRUCTURE OF LANGUAGE

Page 35: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CONTEXT FREE GRAMMARS

Page 36: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

PARSINGMETHODS

TOP DOWN

BOTTOM UP

Page 37: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

TOP DOWN PARSE AS SEARCH “1THE2OLD3MAN3CRIED5”

NEED TO GENERATEALL POSSIBILITIES

NEED TO GENERATEALL POSSIBILITIES

ALL TERMS ARE GONE BUT NOT AT END OF SENTENCE!

TAKING FIRST BACKUP STATE

SERIES OF FAILURES TO RESUME AT POSITION 4

STARTING AGAIN AT 1!

Page 38: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHARTS: ELIMINATING REPEATING THE SAME WORK AGAIN AND AGAIN

“THE” “LARGE”

LEXICON GRAMMAR

Page 39: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHARTS: ELIMINATING REPEATING THE SAME WORK AGAIN AND AGAIN

“THE” “LARGE”

LEXICON GRAMMAR

STARTING ARC

EXTENDING ARC ARC

Page 40: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHART EXAMPLE (2) ADDING NEXT WORD: “CAN”

NEW LEXICALCONSTITUENTS

NEW ACTIVE ARCS (EXTENTIONS)

NEW CONSTITUENTS(FROM COMPLETING ARCS)

Page 41: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHART EXAMPLE (2) ADDING NEXT WORD: “CAN”

NEW LEXICALCONSTITUENTS

NEW ACTIVE ARCS (EXTENTIONS)

NEW ACTIVE ARCS (FROM GRAMMAR)

NEW CONSTITUENTS(FROM COMPLETING ARCS)

Page 42: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHART EXAMPLE (3) “THE LARGE CAN CAN HOLD”

Page 43: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHART EXAMPLE (3) “THE LARGE CAN CAN HOLD”

NEW LEXICALCONSTITUENTS

NEW ARCS (FROM GRAMMAR)

Page 44: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHART EXAMPLE (4) “THE LARGE CAN CAN HOLD THE WATER”

NEW LEXICALCONSTITUENTS

Page 45: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHART EXAMPLE (4) “THE LARGE CAN CAN HOLD THE WATER”

NEW LEXICALCONSTITUENTS

NEW CONSITUENTSFOR NP “THE WATER”

Page 46: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHART EXAMPLE (4) “THE LARGE CAN CAN HOLD THE WATER”

NEW LEXICALCONSTITUENTS

NEW CONSITUENTSFOR NP “THE WATER”

VP1 (RULE 6 FROM V3 & NP3) ARC COMPLETES

Page 47: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHART EXAMPLE (4) “THE LARGE CAN CAN HOLD THE WATER”

NEW LEXICALCONSTITUENTS

ARC COMPLETESVP2 (RULE 5 FROM AUX2 & VP1)

NEW CONSITUENTSFOR NP “THE WATER”

VP1 (RULE 6 FROM V3 & NP3) ARC COMPLETES

Page 48: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHART EXAMPLE (4) “THE LARGE CAN CAN HOLD THE WATER”

NEW LEXICALCONSTITUENTS

ARC COMPLETESVP2 (RULE 5 FROM AUX2 & VP1)

ARC COMPLETESS1 (RULE 1 FROM NP1 & VP2)

NEW CONSITUENTSFOR NP “THE WATER”

VP1 (RULE 6 FROM V3 & NP3) ARC COMPLETES

Page 49: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

CHART EXAMPLE (5) “THE LARGE CAN CAN HOLD THE WATER”

THE COMPLETE CHART

Page 50: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

TOWARDS PRACTICAL PARSING

DISAMBIGUATIONTHERE MAY BE 100S OF “LEGAL” SYNTACTIC PARSES OF A SENTENCE, WHICH ONE IS RIGHT?

EXPRESSIVITYON THE FACE OF IT, NATURAL LANGUAGE SEEMS BEYOND THE PRACTICAL EXPRESSIVE POWER OF CONTEXT-FREE GRAMMARS

AGREEMENT, “MOVEMENT” (E.G., QUESTIONS, RELATIVE CLAUSES, ..), ...

Page 51: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

DISAMBIGUATION: STATISTICAL PARSERS

LARGECORPUS

OF PARSEDSENTENCES

(E.G., PENN TREEBANK)

PROBABILITYESTIMATION

PROBABILISTIC LEXICON

PROBABILISTIC GRAMMAR

Page 52: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

DISAMBIGUATION: STATISTICAL PARSERS

PROBABILISTIC LEXICON

PROBABILISTIC GRAMMAR

PROBABILISTIC CHART

“A” “FLOWER”

“A” “FLOWER”

PROB(CONSTITUENT) = PROB(RULE)*PROB(SUBCONSTIT1)*...*PROB(SUBCONSTITN)

NOTE: SORRY, THE PROBABILITIES IN THE CHART COME FROM A DIFFERENT

MODEL SO ARE NOT COMPUTABLE FROM THIS GRAMMAR & LEXICON!

Page 53: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

STATE OF THE ART IN STATISTICAL PARSING

A PURE PROBABILISTIC CONTEXT FREE GRAMMAR (PCFG) DOES NOT PERFORM WELL

BY ADDING MORE CONTEXT IN THE RULE PROBABILITIES (E.G., NP RULES AS SUBJECT OF AN S, ....) WE CAN PRODUCE HIGH PERFORMANCE SYSTEMS

ACCURACY AROUND 95% OF CONSTITUENTS

SOUNDS GOOD, BUT NOTE THAT FOR A 10 WORD SENTENCE THATIS LESS THAN A 50% CHANCE OF A TOTALLY CORRECT PARSE!

CHECK OUT STANFORD PARSER ONLINE: NLP.STANFORD.EDU:8080/PARSER/

Page 54: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

FOCUS OF THE COURSE

MOST APPLICATIONS INVOLVING LANGUAGE IN DATA SCIENCE INVOLVE STATISTICAL MODELS

“SHALLOW” PROCESSING, LITTLE SEMANTICS OR CONTEXTUAL INTERPRETATION

WE WILL REVIEW THE BASIC STATISTICAL MODELS THAT ARE USED IN CURRENT APPLICATIONS

INFORMATION RETRIEVAL, MACHINE TRANSLATION, SENTIMENT ANALYSIS

Page 55: Lecture 1 - University of Rochester · the happy dog ran in the field with its tongue hanging out language structure and function reference to objects is the function of noun phrases

COURSEWORK

MOST LECTURES WILL START WITH A 15 MINUTE QUIZ BASED

THERE WILL BE A QUIZ THIS THURSDAY ON THE READINGS:

CHAPTER 2 & 3 FROM ALLEN, “NATURAL LANGUAGE UNDERSTANDING”