Package nltk :: Package parse :: Module earleychart :: Class FeatureIncrementalChart
[hide private]
[frames] | no frames]

type FeatureIncrementalChart

source code

           object --+        
                    |        
          chart.Chart --+    
                        |    
         IncrementalChart --+
                            |
           object --+       |
                    |       |
          chart.Chart --+   |
                        |   |
featurechart.FeatureChart --+
                            |
                           FeatureIncrementalChart

Instance Methods [hide private]
iter of EdgeI
select(self, end, **restrictions)
Returns an iterator over the edges in this chart.
source code
 
_add_index(self, restr_keys)
A helper function for select, which creates a new index for a given set of attributes (aka restriction keys).
source code
 
_register_with_indexes(self, edge)
A helper function for insert, which registers the new edge with all existing indexes.
source code

Inherited from IncrementalChart: edges, initialize, iteredges

Inherited from IncrementalChart (private): _append_edge, _positions

Inherited from featurechart.FeatureChart: parses

Inherited from chart.Chart: __init__, __iter__, child_pointer_lists, dot_digraph, insert, insert_with_backpointer, leaf, leaves, num_edges, num_leaves, pp, pp_edge, pp_leaves, trees

Inherited from chart.Chart (private): _choose_children, _trees

Instance Variables [hide private]
Method Details [hide private]

select(self, end, **restrictions)

source code 

Returns an iterator over the edges in this chart. See Chart.select for more information about the restrictions on the edges.

Parameters:
  • span - Only generate edges e where e.span()==span
  • start - Only generate edges e where e.start()==start
  • end - Only generate edges e where e.end()==end
  • length - Only generate edges e where e.length()==length
  • lhs - Only generate edges e where e.lhs()==lhs
  • rhs - Only generate edges e where e.rhs()==rhs
  • next - Only generate edges e where e.next()==next
  • dot - Only generate edges e where e.dot()==dot
  • is_complete - Only generate edges e where e.is_complete()==is_complete
  • is_incomplete - Only generate edges e where e.is_incomplete()==is_incomplete
Returns: iter of EdgeI
An iterator over the edges in this chart. Any new edges that are added to the chart before the iterator is exahusted will also be generated. restrictions can be used to restrict the set of edges that will be generated.
Overrides: chart.Chart.select
(inherited documentation)

_add_index(self, restr_keys)

source code 

A helper function for select, which creates a new index for a given set of attributes (aka restriction keys).

Overrides: chart.Chart._add_index
(inherited documentation)

_register_with_indexes(self, edge)

source code 

A helper function for insert, which registers the new edge with all existing indexes.

Overrides: chart.Chart._register_with_indexes
(inherited documentation)