Package nltk :: Package parse :: Module projectivedependencyparser :: Class ChartCell
[hide private]
[frames] | no frames]

type ChartCell

source code

object --+
         |
        ChartCell

A cell from the parse chart formed when performing the CYK algorithm. Each cell keeps track of its x and y coordinates (though this will probably be discarded), and a list of spans serving as the cell's entries.

Instance Methods [hide private]
 
__init__(self, x, y) source code
 
add(self, span)
Appends the given span to the list of spans representing the chart cell's entries.
source code
string.
__str__(self)
Returns: A verbose string representation of this ChartCell.
source code
string.
__repr__(self)
Returns: A concise string representation of this ChartCell.
source code
Method Details [hide private]

__init__(self, x, y)
(Constructor)

source code 
Parameters:
  • x (int.) - This cell's x coordinate.
  • y (int.) - This cell's y coordinate.
Overrides: object.__init__

add(self, span)

source code 

Appends the given span to the list of spans representing the chart cell's entries.

Parameters:
  • span (DependencySpan.) - The span to add.

__str__(self)
(Informal representation operator)

source code 
Returns: string.
A verbose string representation of this ChartCell.
Overrides: object.__str__

__repr__(self)
(Representation operator)

source code 
Returns: string.
A concise string representation of this ChartCell.
Overrides: object.__repr__