'Attempts to realign punctuation that falls after the period but
should otherwise be included in the same sentence.
For example: "(Sent1.) Sent2." will otherwise be split as::
["(Sent1.", ") Sent1."].
This method will produce::
["(Sent1.)", "Sent2."].'

def _realign_boundaries(self, text, slices):

    realign = 0
    for (sl1, sl2) in _pair_iter(slices):
        sl1 = slice((sl1.start + realign), sl1.stop)
        if (not sl2):
            if text[sl1]:
                (yield sl1)
            continue
        m = self._lang_vars.re_boundary_realignment.match(text[sl2])
        if m:
            (yield slice(sl1.start, (sl2.start + len(m.group(0).rstrip()))))
            realign = m.end()
        else:
            realign = 0
            if text[sl1]:
                (yield sl1)
