nltk.PCFG.leftcorner_parents

PCFG.leftcorner_parents(cat)

Return the set of all nonterminals for which the given category is a left corner. This is the inverse of the leftcorner relation.

Parameters:cat (Nonterminal) – the suggested leftcorner
Returns:the set of all parents to the leftcorner
Return type:set(Nonterminal)