61A Lecture 37 Wednesday, April 29 Announcements 2 Announcements - - PowerPoint PPT Presentation
61A Lecture 37 Wednesday, April 29 Announcements 2 Announcements - - PowerPoint PPT Presentation
61A Lecture 37 Wednesday, April 29 Announcements 2 Announcements Homework 9 (4 pts) due Wednesday 4/29 @ 11:59pm 2 Announcements Homework 9 (4 pts) due Wednesday 4/29 @ 11:59pm Quiz 4 due Thursday 4/30 @ 11:59pm 2 Announcements
Announcements
2
Announcements
- Homework 9 (4 pts) due Wednesday 4/29 @ 11:59pm
2
Announcements
- Homework 9 (4 pts) due Wednesday 4/29 @ 11:59pm
- Quiz 4 due Thursday 4/30 @ 11:59pm
2
Announcements
- Homework 9 (4 pts) due Wednesday 4/29 @ 11:59pm
- Quiz 4 due Thursday 4/30 @ 11:59pm
- No videos on Friday 5/1; Come to lecture (and fill out the HKN course survey at the end)
2
Announcements
- Homework 9 (4 pts) due Wednesday 4/29 @ 11:59pm
- Quiz 4 due Thursday 4/30 @ 11:59pm
- No videos on Friday 5/1; Come to lecture (and fill out the HKN course survey at the end)
§If at least 60% of students respond, everyone gets an extra credit point
2
Announcements
- Homework 9 (4 pts) due Wednesday 4/29 @ 11:59pm
- Quiz 4 due Thursday 4/30 @ 11:59pm
- No videos on Friday 5/1; Come to lecture (and fill out the HKN course survey at the end)
§If at least 60% of students respond, everyone gets an extra credit point
- Next week: 18 hours of review sessions Monday, Tuesday, & Wednesday 11-5 in 271/273 Soda
2
Announcements
- Homework 9 (4 pts) due Wednesday 4/29 @ 11:59pm
- Quiz 4 due Thursday 4/30 @ 11:59pm
- No videos on Friday 5/1; Come to lecture (and fill out the HKN course survey at the end)
§If at least 60% of students respond, everyone gets an extra credit point
- Next week: 18 hours of review sessions Monday, Tuesday, & Wednesday 11-5 in 271/273 Soda
§Two TAs are available every hour
2
Announcements
- Homework 9 (4 pts) due Wednesday 4/29 @ 11:59pm
- Quiz 4 due Thursday 4/30 @ 11:59pm
- No videos on Friday 5/1; Come to lecture (and fill out the HKN course survey at the end)
§If at least 60% of students respond, everyone gets an extra credit point
- Next week: 18 hours of review sessions Monday, Tuesday, & Wednesday 11-5 in 271/273 Soda
§Two TAs are available every hour §One room will be a review session going over topic-specific problems
2
Announcements
- Homework 9 (4 pts) due Wednesday 4/29 @ 11:59pm
- Quiz 4 due Thursday 4/30 @ 11:59pm
- No videos on Friday 5/1; Come to lecture (and fill out the HKN course survey at the end)
§If at least 60% of students respond, everyone gets an extra credit point
- Next week: 18 hours of review sessions Monday, Tuesday, & Wednesday 11-5 in 271/273 Soda
§Two TAs are available every hour §One room will be a review session going over topic-specific problems §The other room is unstructured; staff will answer any questions you have
2
Ambiguity
Syntactic Ambiguity in English
4
Programs must be written for people to read
Syntactic Ambiguity in English
4
1Preface of Structure and Interpretation of Computer Programs
by Harold Abelson and Gerald Sussman with Julie Sussman
1
Programs must be written for people to read
Syntactic Ambiguity in English
4
Sentence
1Preface of Structure and Interpretation of Computer Programs
by Harold Abelson and Gerald Sussman with Julie Sussman
1
Programs must be written for people to read
Syntactic Ambiguity in English
4
Sentence Noun Phrase
1Preface of Structure and Interpretation of Computer Programs
by Harold Abelson and Gerald Sussman with Julie Sussman
1
Programs must be written for people to read
Syntactic Ambiguity in English
4
Sentence Noun Phrase Verb Phrase
1Preface of Structure and Interpretation of Computer Programs
by Harold Abelson and Gerald Sussman with Julie Sussman
1
Programs must be written for people to read
Syntactic Ambiguity in English
4
Sentence Noun Phrase Verb Phrase Subordinate Clause
1Preface of Structure and Interpretation of Computer Programs
by Harold Abelson and Gerald Sussman with Julie Sussman
1
Programs must be written for people to read
Syntactic Ambiguity in English
5
Sentence Noun Phrase Verb Phrase Subordinate Clause
1Preface of Structure and Interpretation of Computer Programs
by Harold Abelson and Gerald Sussman with Julie Sussman
1
Programs must be written for people to read
Syntactic Ambiguity in English
6
Verb Phrase Verb Phrase Sentence Noun Phrase
1Preface of Structure and Interpretation of Computer Programs
by Harold Abelson and Gerald Sussman with Julie Sussman
1
Programs must be written for people to read
Syntactic Ambiguity in English
7
pro•gram (noun) a series of coded software instructions pro•gram (verb) provide a computer with coded instructions must (verb) be obliged to must (noun) dampness or mold
Definitions from the New Oxford American Dictionary
Programs must be written for people to read
Syntax Trees
Representing Syntactic Structure
9
Representing Syntactic Structure
9
cows
Representing Syntactic Structure
9
cows Noun
Representing Syntactic Structure
9
cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
9
cows intimidate Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
9
cows intimidate Noun Verb
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
9
cows intimidate Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
9
Sentence cows intimidate Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
9
Sentence Noun Phrase cows intimidate Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
9
Sentence Noun Phrase cows intimidate Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
cows = Leaf('N', 'cows')
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
cows = Leaf('N', 'cows') intimidate = Leaf('V', 'intimidate')
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
cows = Leaf('N', 'cows') intimidate = Leaf('V', 'intimidate') S, NP, VP = 'S', 'NP', 'VP'
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
cows = Leaf('N', 'cows') intimidate = Leaf('V', 'intimidate') S, NP, VP = 'S', 'NP', 'VP' Tree(S, [Tree(NP, [cows]),
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
cows = Leaf('N', 'cows') intimidate = Leaf('V', 'intimidate') S, NP, VP = 'S', 'NP', 'VP' Tree(S, [Tree(NP, [cows]), Tree(VP, [intimidate,
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
cows = Leaf('N', 'cows') intimidate = Leaf('V', 'intimidate') S, NP, VP = 'S', 'NP', 'VP' Tree(S, [Tree(NP, [cows]), Tree(VP, [intimidate, Tree(NP, [cows])])])
Representing Syntactic Structure
A Tree represents a phrase:
- tag -- What kind of phrase (e.g., S, NP, VP)
- branches -- Sequence of Tree or Leaf components
A Leaf represents a single word:
- tag -- What kind of word (e.g., N, V)
- word -- The word
9
Sentence Noun Phrase cows intimidate Noun Phrase Verb Phrase Noun Verb cows Noun
Photo by Vince O'Sullivan licensed under http://creativecommons.org/licenses/by-nc-nd/2.0/
(Demo) cows = Leaf('N', 'cows') intimidate = Leaf('V', 'intimidate') S, NP, VP = 'S', 'NP', 'VP' Tree(S, [Tree(NP, [cows]), Tree(VP, [intimidate, Tree(NP, [cows])])])
Grammars
Context-Free Grammar Rules
11
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP
A Sentence ...
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP
A Sentence ... ... can be expanded as ...
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP
A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S NP VP
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S S NP VP
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S NP VP S NP VP
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S NP VP S NP VP NP N
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S NP VP N S NP VP NP N
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S NP VP N S NP VP NP N N buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo NP VP N S NP VP NP N N buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo NP VP N S NP VP NP N N buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo NP VP N S NP VP NP N VP V NP N buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo NP VP N NP V S NP VP NP N VP V NP N buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo NP VP N NP V S NP VP NP N VP V NP N buffalo V buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo buffalo NP VP N NP V S NP VP NP N VP V NP N buffalo V buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo buffalo NP VP N NP V S NP VP NP N VP V NP N buffalo V buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo buffalo NP VP N NP V N S NP VP NP N VP V NP N buffalo V buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo buffalo NP VP N NP V buffalo N S NP VP NP N VP V NP N buffalo V buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo buffalo NP VP N NP V buffalo N S NP VP NP N VP V NP N buffalo V buffalo
Grammar A Sentence ... ... can be expanded as ... ... a Noun Phrase then a Verb Phrase.
Context-Free Grammar Rules
A grammar rule describes how a tag can be expanded as a sequence of tags or words
11
S NP VP S buffalo buffalo NP VP N NP V buffalo N S NP VP NP N VP V NP N buffalo V buffalo (Demo)
Parsing
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
13
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
13
buffalo buffalo buffalo buffalo
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
13
buffalo buffalo buffalo buffalo S
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
13
buffalo buffalo buffalo buffalo S
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
13
buffalo buffalo buffalo buffalo S
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
13
buffalo buffalo buffalo buffalo S 1 2 3 4
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
13
buffalo buffalo buffalo buffalo S NP 1 2 3 4
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
13
buffalo buffalo buffalo buffalo S VP NP 1 2 3 4
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
13
buffalo buffalo buffalo buffalo S VP NP 1 2 3 4
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
14
S NP VP buffalo buffalo buffalo buffalo 1 2 3 4
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
14
S NP VP N buffalo buffalo buffalo buffalo 1 2 3 4
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
14
S NP VP N
Constraint: A Leaf must match the input word
buffalo buffalo buffalo buffalo 1 2 3 4
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
14
S NP VP N
Constraint: A Leaf must match the input word
buffalo buffalo buffalo buffalo 1 2 3 4
V J N NP
Exhaustive Parsing
Expand all tags recursively, but constrain words to match input
14
S NP VP N
Constraint: A Leaf must match the input word
buffalo buffalo buffalo buffalo 1 2 3 4
Exhaustive Parsing
15
1 2 3 4 Expand all tags recursively, but constrain words to match input S NP VP buffalo buffalo buffalo buffalo
Exhaustive Parsing
16
Expand all tags recursively, but constrain words to match input S NP VP buffalo buffalo buffalo buffalo 1 2 3 4
Exhaustive Parsing
16
Expand all tags recursively, but constrain words to match input S NP VP buffalo buffalo buffalo buffalo J N 1 2 3 4
Exhaustive Parsing
16
Expand all tags recursively, but constrain words to match input S NP VP buffalo buffalo buffalo buffalo NP N V J N 1 2 3 4
Exhaustive Parsing
16
(Demo) Expand all tags recursively, but constrain words to match input S NP VP buffalo buffalo buffalo buffalo NP N V J N 1 2 3 4
Learning
(Demo)
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP S NP VP NP NN NNS NN teacher NNS strikes VB idle NNS kids VP VB NP NP NNS
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP S NP VP NP NN NNS NN teacher NNS strikes VB idle NNS kids VP VB NP NP NNS Rule frequency per 100,000 tags
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP S NP VP NP NN NNS NN teacher NNS strikes VB idle NNS kids VP VB NP NP NNS Rule frequency per 100,000 tags 25372
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP S NP VP NP NN NNS NN teacher NNS strikes VB idle NNS kids VP VB NP NP NNS Rule frequency per 100,000 tags 25372 1335
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP S NP VP NP NN NNS NN teacher NNS strikes VB idle NNS kids VP VB NP NP NNS Rule frequency per 100,000 tags 25372 1335 6679
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP S NP VP NP NN NNS NN teacher NNS strikes VB idle NNS kids VP VB NP NP NNS Rule frequency per 100,000 tags 25372 1335 6679 4282
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP S NP VP NP NN NNS NN teacher NNS strikes VB idle NNS kids VP VB NP NP NNS Rule frequency per 100,000 tags 5 25372 1335 6679 4282
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP S NP VP NP NN NNS NN teacher NNS strikes VB idle NNS kids VP VB NP NP NNS Rule frequency per 100,000 tags 5 25372 1335 6679 4282 25
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP S NP VP NP NN NNS NN teacher NNS strikes VB idle NNS kids VP VB NP NP NNS Rule frequency per 100,000 tags 5 25372 1335 6679 4282 26 25
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
18
teacher strikes idle kids
S NP NN NNS VB NNS NP VP S NP VP NP NN NNS NN teacher NNS strikes VB idle NNS kids VP VB NP NP NNS Rule frequency per 100,000 tags 5 32 25372 1335 6679 4282 26 25
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
19
VP S NN VBZ JJ NNS NP NP Rule frequency per 100,000 tags 19 5 18 32 4358 25372 3160 2526 1335 6679 4282 26 25
teacher strikes idle kids
S NP VP NP NN NN teacher VBZ strikes JJ idle NNS kids VP VBZ NP NP JJ NNS
Scoring a Tree Using Relative Frequencies
Not all syntactic structures are equally common
19