Package nltk :: Package ccg :: Module chart :: Class CCGChart
[hide private]
[frames] | no frames]

type CCGChart

source code

       object --+    
                |    
parse.chart.Chart --+
                    |
                   CCGChart

Instance Methods [hide private]
 
__init__(self, tokens)
Construct a new chart.
source code
 
_trees(self, edge, complete, memo, tree_class)
A helper function for trees.
source code

Inherited from parse.chart.Chart: __iter__, child_pointer_lists, dot_digraph, edges, initialize, insert, insert_with_backpointer, iteredges, leaf, leaves, num_edges, num_leaves, parses, pp, pp_edge, pp_leaves, select, trees

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

__init__(self, tokens)
(Constructor)

source code 

Construct a new chart. The chart is initialized with the leaf edges corresponding to the terminal leaves.

Parameters:
  • tokens - The sentence that this chart will be used to parse.
Overrides: parse.chart.Chart.__init__
(inherited documentation)

_trees(self, edge, complete, memo, tree_class)

source code 

A helper function for trees.

Parameters:
  • memo - A dictionary used to record the trees that we've generated for each edge, so that when we see an edge more than once, we can reuse the same trees.
Overrides: parse.chart.Chart._trees
(inherited documentation)