nltk.CFG.is_leftcorner

CFG.is_leftcorner(cat, left)[source]

True if left is a leftcorner of cat, where left can be a terminal or a nonterminal.

Parameters:
  • cat (Nonterminal) – the parent of the leftcorner
  • left (Terminal or Nonterminal) – the suggested leftcorner
Return type:

bool