nltk.PCFG.leftcorners

PCFG.leftcorners(cat)

Return the set of all nonterminals that the given nonterminal can start with, including itself.

This is the reflexive, transitive closure of the immediate leftcorner relation: (A > B) iff (A -> B beta)

Parameters:cat (Nonterminal) – the parent of the leftcorners
Returns:the set of all leftcorners
Return type:set(Nonterminal)