Package nltk :: Package parse :: Module featurechart
[hide private]
[frames] | no frames]

Module featurechart

source code

Extension of chart parsing implementation to handle grammars with feature structures as nodes.

Classes [hide private]
FeatureTreeEdge
A specialized tree edge that allows shared variable bindings between nonterminals on the left-hand side and right-hand side.
FeatureChart
A Chart for feature grammars.
FeatureFundamentalRule
A specialized version of the fundamental rule that operates on nonterminals whose symbols are FeatStructNonterminals.
FeatureSingleEdgeFundamentalRule
A specialized version of the completer / single edge fundamental rule that operates on nonterminals whose symbols are FeatStructNonterminals.
FeatureTopDownInitRule
FeatureTopDownPredictRule
A specialized version of the (cached) top down predict rule that operates on nonterminals whose symbols are FeatStructNonterminals.
FeatureBottomUpPredictRule
FeatureBottomUpPredictCombineRule
FeatureEmptyPredictRule
FeatureChartParser
FeatureTopDownChartParser
FeatureBottomUpChartParser
FeatureBottomUpLeftCornerChartParser
InstantiateVarsChart
A specialized chart that 'instantiates' variables whose names start with '@', by replacing them with unique new variables.
Functions [hide private]
 
demo_grammar() source code
 
demo(should_print_times=True, should_print_grammar=True, should_print_trees=True, should_print_sentence=True, trace=1, parser=<class 'nltk.parse.featurechart.FeatureChartParser'>, sent='I saw John with a dog with my cookie') source code
 
run_profile() source code
Variables [hide private]
  TD_FEATURE_STRATEGY = [LeafInitRule(), FeatureTopDownInitRule(...
  BU_FEATURE_STRATEGY = [LeafInitRule(), FeatureEmptyPredictRule...
  BU_LC_FEATURE_STRATEGY = [LeafInitRule(), FeatureEmptyPredictR...
Variables Details [hide private]

TD_FEATURE_STRATEGY

Value:
[LeafInitRule(), FeatureTopDownInitRule(), FeatureTopDownPredictRule()\
, FeatureSingleEdgeFundamentalRule()]

BU_FEATURE_STRATEGY

Value:
[LeafInitRule(), FeatureEmptyPredictRule(), FeatureBottomUpPredictRule\
(), FeatureSingleEdgeFundamentalRule()]

BU_LC_FEATURE_STRATEGY

Value:
[LeafInitRule(), FeatureEmptyPredictRule(), FeatureBottomUpPredictComb\
ineRule(), FeatureSingleEdgeFundamentalRule()]