Download presentation
Presentation is loading. Please wait.
Published byMercy O’Neal’ Modified over 9 years ago
1
Introduction to Syntactic Parsing Roxana Girju November 18, 2004 Some slides were provided by Michael Collins (MIT) and Dan Moldovan (UT Dallas)
2
Overview An introduction to the parsing problem Context free grammars (CFDs) A brief(!) sketch of the syntax of English Examples of ambiguous structures PCFGs, their formal properties Weaknesses of PCFGs Heads in CFGs Chart parsing – algorithm and an example
3
Syntactic Parsing Syntax: provides rules to put together words to form components of sentence and to put together these components to form sentences. Knowledge of syntax is useful for: 1.Parsing 2.QA 3.IE 4.Translation, etc. Grammar: is the formal specification of rules of a language. Parsing/Syntactic Parsing : is a method to perform syntactic analysis of a sentence.
4
Parsing (Syntactic Structure) INPUT: Boeing is located in Seattle. OUTPUT: S NP N Boeing VP V is VP V located PP P in NP N Seattle
5
Data for Parsing Experiments Canadian Utilities had1988 revenue of NNPNNPSVBD CDNN NP IN C$ 1.16 billion, $CDCD PUNC, QP NP PP NP mainly RB ADVP from its IN PRP$ natural gas JJNN and electric utility businessesin CCJJNNNNS NP IN Alberta,where NNP PUNC, WHADVP NP WRB the company serves about 800,000 customers. DTNN NP VBZ RBCD QP NNS PUNC. NP VP S SBAR NP PP NP PP VP Penn WSJ Treebank = 50,000 sentences with associated trees Usual set-up: 40,000 training sentences, 2400 test sentences An example tree: TOP S NP Canadian Utilities had 1988 revenue of C$ 1.16 billion, mainly from its natural gas and electric utility businesses in Alberta, where the company serves about 800,000 customers.
6
The Information Conveyed by Parse Trees 1) Part of speech (POS) for each word (N/NN = noun, V = verb, D/DT = determiner, P/IN=preposition) S NP D theburglar N VP V robbed NP D theapartment N
7
2) Phrases S NP DT theburglar N VP V robbed DT NP theapartment Noun Phrases (NP): “the burglar”, “the apartment” Verb Phrases (VP):“robbed the apartment” Sentences (S):“the burglar robbed the apartment” N
8
3) Useful Relationships S NP subjectV VP verb S NP DT theburglar N VP V robbed NP DT theapartment =>“the burglar” is the subject of “robbed” N
9
An Example Application: Machine Translation English word order is Japanese word order is subject – verb – object subject – object – verb English: Japanese: IBM bought Lotus IBM Lotus bought English: Japanese: Sources said that IBM bought Lotus yesterday Sources yesterday IBM Lotus bought that said
11
1 2 3 4 5 7 6 NP => NN 8 NOTE: VI/VT=VB
13
DERIVATION S RULES USED
14
DERIVATION S RULES USED S=>NP VP NP VP
15
DERIVATION S RULES USED S=>NP VP NP=>DT N NP VP DT N VP
38
The Problem with Parsing: Ambiguity INPUT: She announced a program to promote safety in trucks and vans + POSSIBLE OUTPUTS: S NP She VP announced NP a program VP totopromote NP safety PP inNP trucks and vans S NP She VP announced NP a program VP totopromote NP safety PP in NP trucks andand NP vans S NP SheShe VP announced NP a program VP totopromote NP NPand safety PP in NP trucks NP vans S NP She VP announced NP a program VP totopromote NP PP safetysafety inNP trucks and vans S NP SheShe VP announced NP a program VP to promote NP PP safety in NP trucks andand NP vans S NP She VP announced NP NPVP a program to promote NP safetysafety PP inNP trucks and vans And there are more...
40
9 10 11 12
43
13
45
VP Vt drove PP downthestreet PP inthecar VP Vt drove PP down NP the N street PP inthecar
46
NP D the N N JJ fast N NN car N NN mechanic PP IN under NP D the N N NN pigeonin PP IN NP D N theNN box
47
NP D the N N N JJ fast N NN car N NN mechanic PP IN under NP D the N NN pigeon PP IN in NP D N theNN box
48
Sources of Ambiguity: Noun Premodifiers fast NN car N NN Noun premodifiers:NP D the N JJ N mechanic D the N N JJ N fastNN car N NN mechanic
49
A Funny Thing about the Penn Treebank Leaves NP premodifier structure flat, or underspecified: NP DT the JJ fast NN carmechanic NN NP DT the JJ fast NN carmechanic NN PP IN under NP DT thepigeon NN
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.