A hypothesis about the structure of part of a sentence. Each edge
records the fact that a structure is (partially) consistent with the
sentence. An edge contains:
|
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
(int, int)
|
span(self)
Returns:
A tuple (s,e) , where subtokens[s:e] is the
portion of the sentence that is consistent with this edge's
structure. |
source code
|
|
int
|
|
int
|
|
int
|
|
|
lhs(self)
Returns:
This edge's left-hand side, which specifies what kind of structure is
hypothesized by this edge. |
source code
|
|
|
rhs(self)
Returns:
This edge's right-hand side, which specifies the content of the
structure hypothesized by this edge. |
source code
|
|
int
|
dot(self)
Returns:
This edge's dot position, which indicates how much of the
hypothesized structure is consistent with the sentence. |
source code
|
|
Nonterminal or terminal or None
|
next(self)
Returns:
The element of this edge's right-hand side that immediately follows
its dot. |
source code
|
|
boolean
|
|
boolean
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|