Function mergeSeam

  • next with the words the overlap repeated dropped: the longest run of two to twenty words that ends previous and starts next within its first three words (the words before the run in next are the cut word and dropped with it), compared without case or punctuation. With no such run, next whole.

    Parameters

    • previous: string

      The text so far. Its last twenty words are the ones compared.

    • next: string

      The text of the piece that follows.

    Returns string

    next from the first word after the run on, empty when the run ends it; with no run, next trimmed.