A blackboard for hypotheses about the syntactic constituents of a
sentence. A chart contains a set of edges, and each edge encodes a single
hypothesis about the structure of some portion of the sentence.
Method Summary |
|
__init__ (self,
tokens)
Construct a new empty chart. |
iter of EdgeI
|
__iter__ (self)
Return an iterator over the edges in this chart. |
list of list of
Edge
|
child_pointer_lists (self,
edge)
Return the set of child pointer lists for the given edge. |
|
dot_digraph(self)
|
list of EdgeI
|
edges (self)
Return a list of all edges in this chart. |
bool
|
insert (self,
edge,
child_pointer_list)
Add a new edge to the chart. |
iter of EdgeI
|
iteredges (self)
Return an iterator over the edges in this chart. |
string
|
leaf (self,
index)
Return the leaf value of the word at the given index. |
list of string
|
leaves (self)
Return a list of the leaf values of each word in the chart's sentence. |
int
|
num_edges (self)
Return the number of edges contained in this chart. |
int
|
num_leaves (self)
Return the number of words in this chart's sentence. |
|
parses (self,
root,
tree_class)
Return a list of the complete tree structures that span the entire chart, and
whose root node is root . |
string
|
pp (self,
width)
Return a pretty-printed string representation of this chart. |
string
|
pp_edge (self,
edge,
width)
Return a pretty-printed string representation of a given edge in this
chart. |
|
pp_leaves (self,
width)
Return a pretty-printed string representation of this chart's leaves. |
iter of EdgeI
|
select (self,
**restrictions)
Return an iterator over the edges in this chart. |
list of Tree
|
trees (self,
edge,
tree_class,
complete)
Return a list of the tree structures that are associated with
edge . |
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|