Implement the CKY algorithm for lexicalized PCFGs.