|
__init__(self,
grammar,
tokens,
title=' Chart Parsing Demo ' )
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
apply_strategy(self,
strategy,
edge_strategy=None) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|
|
CHART_FILE_TYPES = [ ( ' Pickle file ' , ' .pickle ' ) , ( ' All files ' , ...
|
|
GRAMMAR_FILE_TYPES = [ ( ' Plaintext grammar file ' , ' .cfg ' ) , ( ' Pi ...
|
|
_TD_INIT = [TopDownInitRule()]
|
|
_TD_EXPAND = [TopDownExpandRule()]
|
|
_TD_MATCH = [TopDownMatchRule()]
|
|
_BU_INIT = [BottomUpInitRule()]
|
|
_BU_RULE = [BottomUpPredictRule()]
|
|
_FUNDAMENTAL = [SingleEdgeFundamentalRule()]
|
|
_EARLEY_INIT = [PseudoEarleyInitRule()]
|
|
_TD_STRATEGY = _TD_INIT+ _TD_EXPAND+ _TD_MATCH+ _FUNDAMENTAL
|
|
_BU_STRATEGY = _BU_INIT+ _BU_RULE+ _FUNDAMENTAL
|
|
_EARLEY = _EARLEY_INIT+ _EARLEY
|