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

type FeatureSingleEdgeFundamentalRule

source code

         object --+                
                  |                
   chart.ChartRuleI --+            
                      |            
chart.AbstractChartRule --+        
                          |        
      chart.FundamentalRule --+    
                              |    
chart.SingleEdgeFundamentalRule --+
                                  |
                                 FeatureSingleEdgeFundamentalRule
Known Subclasses:

A specialized version of the completer / single edge fundamental rule that operates on nonterminals whose symbols are FeatStructNonterminals. Rather than simply comparing the nonterminals for equality, they are unified.

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

Inherited from chart.AbstractChartRule: __str__, apply, apply_everywhere, apply_everywhere_iter

Class Variables [hide private]
  _fundamental_rule = FeatureFundamentalRule()

Inherited from chart.SingleEdgeFundamentalRule: NUM_EDGES

Method Details [hide private]

_apply_complete(self, chart, grammar, right_edge)

source code 
Overrides: chart.SingleEdgeFundamentalRule._apply_complete

_apply_incomplete(self, chart, grammar, left_edge)

source code 
Overrides: chart.SingleEdgeFundamentalRule._apply_incomplete

apply_iter(self, chart, grammar, edge)

 
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)