Package nltk :: Package parse :: Module pchart :: Class SingleEdgeProbabilisticFundamentalRule
[hide private]
[frames] | no frames]

type SingleEdgeProbabilisticFundamentalRule

source code

         object --+        
                  |        
   chart.ChartRuleI --+    
                      |    
chart.AbstractChartRule --+
                          |
                         SingleEdgeProbabilisticFundamentalRule

Instance Methods [hide private]
iter of EdgeI
apply_iter(self, chart, grammar, edge1)
Returns: A generator that will add edges licensed by this rule and the given edges to the chart, one at a time.
source code
 
__str__(self) source code

Inherited from chart.AbstractChartRule: apply, apply_everywhere, apply_everywhere_iter

Class Variables [hide private]
int NUM_EDGES = 1
The number of existing edges that this rule uses to license new edges.
  _fundamental_rule = ProbabilisticFundamentalRule()
Method Details [hide private]

apply_iter(self, chart, grammar, edge1)

source code 
Parameters:
  • edges - A set of existing edges. The number of edges that should be passed to apply is specified by the NUM_EDGES class variable.
Returns: iter of EdgeI
A generator that will add edges licensed by this rule and the given edges to the chart, one at a time. Each time the generator is resumed, it will either add a new edge and yield that edge; or return.
Overrides: chart.ChartRuleI.apply_iter
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
Overrides: chart.AbstractChartRule.__str__