class documentation

Class representing leaf edges in a CCG derivation.

Method __init__ Undocumented
Method categ Undocumented
Method dot Return this edge's dot position, which indicates how much of the hypothesized structure is consistent with the sentence. In particular, self.rhs[:dot] is consistent with tokens[self.start():self.end()]...
Method end Return the end index of this edge's span.
Method is_complete Return True if this edge's structure is fully consistent with the text.
Method is_incomplete Return True if this edge's structure is partially consistent with the text.
Method leaf Undocumented
Method length Return the length of this edge's span.
Method lhs Return this edge's left-hand side, which specifies what kind of structure is hypothesized by this edge.
Method nextsym Return the element of this edge's right-hand side that immediately follows its dot.
Method rhs Return this edge's right-hand side, which specifies the content of the structure hypothesized by this edge.
Method span Return a tuple (s, e), where tokens[s:e] is the portion of the sentence that is consistent with this edge's structure.
Method start Return the start index of this edge's span.
Method token Undocumented
Instance Variable _comparison_key Undocumented
Instance Variable _leaf Undocumented
Instance Variable _pos Undocumented
Instance Variable _token Undocumented

Inherited from EdgeI:

Method __eq__ Undocumented
Method __hash__ Undocumented
Method __lt__ Undocumented
Method __ne__ Undocumented
Instance Variable _hash Undocumented
def __init__(self, pos, token, leaf): (source)

Undocumented

def categ(self): (source)

Undocumented

def dot(self): (source)

Return this edge's dot position, which indicates how much of the hypothesized structure is consistent with the sentence. In particular, self.rhs[:dot] is consistent with tokens[self.start():self.end()].

Returns
intUndocumented
def end(self): (source)

Return the end index of this edge's span.

Returns
intUndocumented
def is_complete(self): (source)

Return True if this edge's structure is fully consistent with the text.

Returns
boolUndocumented
def is_incomplete(self): (source)

Return True if this edge's structure is partially consistent with the text.

Returns
boolUndocumented
def leaf(self): (source)

Undocumented

def length(self): (source)

Return the length of this edge's span.

Returns
intUndocumented
def lhs(self): (source)

Return this edge's left-hand side, which specifies what kind of structure is hypothesized by this edge.

See Also
TreeEdge and LeafEdge for a description of the left-hand side values for each edge type.
def nextsym(self): (source)

Return the element of this edge's right-hand side that immediately follows its dot.

Returns
Nonterminal or terminal or NoneUndocumented
def rhs(self): (source)

Return this edge's right-hand side, which specifies the content of the structure hypothesized by this edge.

See Also
TreeEdge and LeafEdge for a description of the right-hand side values for each edge type.
def span(self): (source)

Return a tuple (s, e), where tokens[s:e] is the portion of the sentence that is consistent with this edge's structure.

Returns
tuple(int, int)Undocumented
def start(self): (source)

Return the start index of this edge's span.

Returns
intUndocumented
def token(self): (source)

Undocumented

_comparison_key = (source)

Undocumented

Undocumented

Undocumented

Undocumented