CFG from rules to parse trees
context-free grammars · parsing strategies · derivations
CKY (Cocke–Kasami–Younger)
How it works →40 steps · 2 parses found for “the man saw a dog with a telescope”.
Step 1 / 40
- Input
span of this item
Table: cell [i,j] holds the categories spanning words i+1…j
Binarised rules (CKY needs at most two daughters)
NP → Det NP|N_PPNP|N_PP → N PPVP → V VP|NP_PPVP|NP_PP → NP PP All 40 steps
2 parse trees
Parse 1
[S [NP [Det the] [N man]] [VP [V saw] [NP [Det a] [N dog] [PP [P with] [NP [Det a] [N telescope]]]]]]
Parse 2
[S [NP [Det the] [N man]] [VP [V saw] [NP [Det a] [N dog]] [PP [P with] [NP [Det a] [N telescope]]]]]