'Construct a new ``TreeEdge``.
:type span: tuple(int, int)
:param span: A tuple ``(s, e)``, where ``tokens[s:e]`` is the
portion of the sentence that is consistent with the new
edge\'s structure.
:type lhs: Nonterminal
:param lhs: The new edge\'s left-hand side, specifying the
hypothesized tree\'s node value.
:type rhs: list(Nonterminal and str)
:param rhs: The new edge\'s right-hand side, specifying the
hypothesized tree\'s children.
:type dot: int
:param dot: The position of the new edge\'s dot.  This position
specifies what prefix of the production\'s right hand side
is consistent with the text.  In particular, if
``sentence`` is the list of tokens in the sentence, then
``okens[span[0]:span[1]]`` can be spanned by the
children specified by ``rhs[:dot]``.'

def __init__(self, span, lhs, rhs, dot=0):

    self._span = span
    self._lhs = lhs
    rhs = tuple(rhs)
    self._rhs = rhs
    self._dot = dot
    self._comparison_key = (span, lhs, rhs, dot)
