Академический Документы
Профессиональный Документы
Культура Документы
1
3/6/2019
Parsing
3
3/6/2019
Dynamic Programming
4
3/6/2019
CKY Parsing
5
3/6/2019
Note on index convention
• 0 to n
• Think of them as the inter-word space
0 = before 1st word
1 = before 2nd word (or AFTER 1st word)
n= after nth word
• 0 The 1 book 2 is 3 on 4 the 5 table 6
• A rule that spans 0 to 6 will span the
sentence
6
3/6/2019
CKY
7
3/6/2019
CKY
8
3/6/2019
CKY
9
3/6/2019
CKY Table
10
3/6/2019
CKY Algorithm
11
3/6/2019
Note
12
3/6/2019
Example
13
3/6/2019
CKY Parsing
14
3/6/2019
Other Ways to Do It?
15
3/6/2019
Other Ways to Do It?
16
3/6/2019
Sample Grammar
17
3/6/2019
Problem
18
3/6/2019
Problem
19
3/6/2019
Binarization Intuition
20
3/6/2019
CNF Conversion
21
3/6/2019
CKY Algorithm
22
3/6/2019
Example
Filling column 5
23
3/6/2019
Example
24
3/6/2019
Example
25
3/6/2019
Example
26
3/6/2019
Example
27
3/6/2019
CKY Notes
29
3/6/2019
States
30
3/6/2019
States/Locations
31
3/6/2019
Graphically
32
3/6/2019
Earley
34
3/6/2019
Earley
• More specifically…
1. Predict all the states you can upfront
2. Read a word
1. Extend states based on matches
2. Generate new predictions
3. Go to step 2
3. Look at n to see if you have a winner
35
3/6/2019
Earley Code
36
3/6/2019
Earley Code
37
3/6/2019
Example
38
3/6/2019
Example
39
3/6/2019
Add To Chart
40
3/6/2019
Example
41
3/6/2019
Example
42
3/6/2019
Efficiency
43
3/6/2019
Details
44
3/6/2019
Back to Ambiguity
45
3/6/2019
Ambiguity
46
3/6/2019
Ambiguity
• No…
Both CKY and Earley will result in multiple S
structures for the [0,n] table entry.
They both efficiently store the sub-parts that
are shared between multiple parses.
And they obviously avoid re-deriving those
sub-parts.
But neither can tell us which one is right.
47
3/6/2019
Ambiguity
48
3/6/2019
Full Syntactic Parsing
51
3/6/2019
Partial Parsing
• Two approaches
Rule-based (hierarchical) transduction.
Statistical sequence labeling
HMMs
MEMMs
52
3/6/2019
Rule-Based Partial Parsing
53
3/6/2019
Typical Architecture
54
3/6/2019
Partial Parsing
• No direct or indirect
recursion allowed in
these rules.
• That is you can’t
directly or indirectly
reference the LHS of
the rule on the RHS.
55
3/6/2019
Cascaded Transducers
56
3/6/2019
Partial Parsing
57
3/6/2019