Package nltk :: Package app :: Module chartparser_app :: Class ChartParserApp
[hide private]
[frames] | no frames]

type ChartParserApp

source code

object --+
         |
        ChartParserApp

Instance Methods [hide private]
 
__init__(self, grammar, tokens, title='Chart Parser Application') source code
 
destroy(self, *args) source code
 
mainloop(self, *args, **kwargs)
Enter the Tkinter mainloop.
source code
 
_init_parser(self, grammar, tokens) source code
 
_reset_parser(self) source code
 
_init_fonts(self, root) source code
 
_init_animation(self) source code
 
_init_chartview(self, parent) source code
 
_init_rulelabel(self, parent) source code
 
_init_buttons(self, parent) source code
 
_init_bindings(self) source code
 
_init_menubar(self) source code
 
_click_cv_edge(self, edge) source code
 
_select_matrix_edge(self, edge) source code
 
_select_edge(self, edge) source code
 
_deselect_edge(self) source code
 
_show_new_edge(self, edge) source code
 
help(self, *e) source code
 
about(self, *e) source code
 
load_chart(self, *args)
Load a chart from a pickle file
source code
 
save_chart(self, *args)
Save a chart to a pickle file
source code
 
load_grammar(self, *args)
Load a grammar from a pickle file
source code
 
save_grammar(self, *args) source code
 
reset(self, *args) 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
 
view_matrix(self, *e) source code
 
view_results(self, *e) source code
 
resize(self) source code
 
set_font_size(self, size) source code
 
get_font_size(self) source code
 
apply_strategy(self, strategy, edge_strategy=None) source code
 
_stop_animation(self, *e) source code
 
_animate_strategy(self, speed=1) source code
 
_apply_strategy(self) source code
 
_display_rule(self, rule) source code
 
top_down_init(self, *e) source code
 
top_down_predict(self, *e) source code
 
bottom_up(self, *e) source code
 
bottom_up_leftcorner(self, *e) source code
 
fundamental(self, *e) source code
 
bottom_up_strategy(self, *e) source code
 
bottom_up_leftcorner_strategy(self, *e) source code
 
top_down_strategy(self, *e) source code
Class Variables [hide private]
  CHART_FILE_TYPES = [('Pickle file', '.pickle'), ('All files', ...
  GRAMMAR_FILE_TYPES = [('Plaintext grammar file', '.cfg'), ('Pi...
  _TD_INIT = [TopDownInitRule()]
  _TD_PREDICT = [TopDownPredictRule()]
  _BU_RULE = [BottomUpPredictRule()]
  _BU_LC_RULE = [BottomUpPredictCombineRule()]
  _FUNDAMENTAL = [SingleEdgeFundamentalRule()]
  _TD_STRATEGY = _TD_INIT+ _TD_PREDICT+ _FUNDAMENTAL
  _BU_STRATEGY = _BU_RULE+ _FUNDAMENTAL
  _BU_LC_STRATEGY = _BU_LC_RULE+ _FUNDAMENTAL
Method Details [hide private]

__init__(self, grammar, tokens, title='Chart Parser Application')
(Constructor)

source code 
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.


Class Variable Details [hide private]

CHART_FILE_TYPES

Value:
[('Pickle file', '.pickle'), ('All files', '*')]

GRAMMAR_FILE_TYPES

Value:
[('Plaintext grammar file', '.cfg'),
 ('Pickle file', '.pickle'),
 ('All files', '*')]