CKY tagging algorithm for producing parse trees