Package nltk :: Package draw :: Module rdparser :: Class RecursiveDescentDemo
[hide private]
[frames] | no frames]

Class RecursiveDescentDemo

source code

object --+
         |
        RecursiveDescentDemo

A graphical tool for exploring the recursive descent parser. The tool displays the parser's tree and the remaining text, and allows the user to control the parser's operation. In particular, the user can expand subtrees on the frontier, match tokens on the frontier against the text, and backtrack. A "step" button simply steps through the parsing process, performing the operations that RecursiveDescentParser would use.

Instance Methods [hide private]
 
__init__(self, grammar, sent, trace=0)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
_init_fonts(self, root) source code
 
_init_grammar(self, parent) source code
 
_init_bindings(self) source code
 
_init_buttons(self, parent) source code
 
_configure(self, event) source code
 
_init_feedback(self, parent) source code
 
_init_canvas(self, parent) source code
 
_init_menubar(self, parent) source code
 
_get(self, widget, treeloc) source code
 
_redraw(self) source code
 
_redraw_quick(self) source code
 
_highlight_nodes(self) source code
 
_highlight_prodlist(self) source code
 
_position_text(self) source code
 
_tree_leaves(self, tree=None) source code
 
destroy(self, *e) source code
 
reset(self, *e) source code
 
autostep(self, *e) source code
 
cancel_autostep(self, *e) source code
 
step(self, *e) source code
 
match(self, *e) source code
 
expand(self, *e) source code
 
backtrack(self, *e) source code
 
_step(self) source code
 
_expand(self, *e) source code
 
_match(self, *e) source code
 
_backtrack(self, *e) source code
 
about(self, *e) source code
 
help(self, *e) source code
 
postscript(self, *e) source code
 
mainloop(self, *args, **kwargs)
Enter the Tkinter mainloop.
source code
 
resize(self, size=None) source code
 
_toggle_grammar(self, *e) source code
 
_prodlist_select(self, event) source code
 
_animate_expand(self, treeloc) source code
 
_makeroom(self, treeseg)
Make sure that no sibling tree bbox's overlap.
source code
 
_animate_expand_frame(self, widget, colors) source code
 
_animate_backtrack(self, treeloc) source code
 
_animate_backtrack_frame(self, widgets, colors) source code
 
_animate_match_backtrack(self, treeloc) source code
 
_animate_match(self, treeloc) source code
 
_animate_match_frame(self, frame, widget, dy) source code
 
_animate_match_backtrack_frame(self, frame, widget, dy) source code
 
edit_grammar(self, *e) source code
 
set_grammar(self, grammar) source code
 
edit_sentence(self, *e) source code
 
set_sentence(self, sentence) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, grammar, sent, trace=0)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

mainloop(self, *args, **kwargs)

source code 

Enter the Tkinter mainloop. This function must be called if this demo is created from a non-interactive program (e.g. from a secript); otherwise, the demo will close as soon as the script completes.