Download presentation
Presentation is loading. Please wait.
Published byCecily Amberly Moore Modified over 9 years ago
1
Parsing and Syntax
2
Syntactic Formalisms: Historic Perspective “Syntax” comes from Greek word “syntaxis”, meaning “setting out together or arrangement” Early grammars: 4th century BC – Panini compiled Sanskrit grammar Idea of constituency – Bloomfield (1914): method for breaking up sentence into a hierarchy of units – Harris (1954): substitutability test for constituent definition Formal work on Syntax goes back to Chomsky’s PhD thesis in 1950s * Some slides in this lecture are adapted from slides of Michael Collins
3
Syntactic Structure
4
A Real Tree
5
What can we Learn from Syntactic Tree? Part-of-speech for each word (N=noun, V=verb, P=preposition) Constituent structure Noun phrase: “the apartment” Verb phrase: “robbed the apartment” Relationship structure “the burglar” is the subject of “robbed”
6
Context-Free Grammars
7
A Context-Free Grammar for English
8
Left-Most Derivation
9
Derivation Example
10
Properties of CFGs
11
Ambiguous Sentence
13
More Ambiguity
14
Syntactic Ambiguity Prepositional phrases They cooked the beans in the pot on the stove with handles. Particle vs preposition The puppy tore up the staircase. Complement structure She knows you like the back of her hand. Gerund vs. participial adjective. Visiting relatives can be boring Modifier scope within NPs Plastic cup holder (examples are compiled by Dan Klein)
15
Human Processing Garden Path: The horse raced past the barn fell. The man who hunts ducks out on weekends Ambiguity maintenance Have the police … eaten their supper? come in and look around taken out and shot
16
A Probabilistic Context-Free Grammar
17
Example
18
Properties of PCFGs
19
Deriving a PCFG from a Corpus
20
Algorithms for PCFG
21
Chomsky Normal Form
22
A Dynamic Programming Algorithm for the Max
23
A Dynamic Programming Algorithm for the Max (cont.)
25
Runtime
26
A Dynamic Programming Algorithm for the Sum
27
A Dynamic Algorithm for the Sum (cont.)
28
A Dynamic Programming Algorithm for the Sum (cont.)
29
Weaknesses of PCFGs Lack of sensitivity to lexical information Lack of sensitivity to structural frequencies
30
PP Attachment Ambiguity
32
Structural Preferences: Close Attachment
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.