nltk.draw.CFGEditor

class nltk.draw.CFGEditor[source]

Bases: object

A dialog window for creating and editing context free grammars. CFGEditor imposes the following restrictions:

  • All nonterminals must be strings consisting of word characters.

  • All terminals must be strings consisting of word characters and space characters.

ARROW = 'Þ'
__init__(parent, cfg=None, set_cfg_callback=None)[source]