def MergeWithSegment(self, other):
    assert ((self.EndTime() >= other.StartTime()) and (self.StartTime() < other.EndTime()) and (self.split_lines_of_utt is other.split_lines_of_utt))
    orig_self_end_index = self.end_index
    self.debug_str = '({0}/merged-with/{1})'.format(self.debug_str, other.debug_str)
    self.end_index = other.end_index
    self.end_unk_padding = other.end_unk_padding
    self.end_keep_proportion = other.end_keep_proportion
    first_index_of_overlap = min((orig_self_end_index - 1), other.start_index)
    last_index_of_overlap = max((orig_self_end_index - 1), other.start_index)
    num_deleted_words = 0
    for i in range(first_index_of_overlap, (last_index_of_overlap + 1)):
        edit_type = self.split_lines_of_utt[i][7]
        if (edit_type == 'del'):
            num_deleted_words += 1
    if (num_deleted_words > args.max_deleted_words_kept_when_merging):
        for i in range(first_index_of_overlap, (last_index_of_overlap + 1)):
            if (self.split_lines_of_utt[i][7] == 'del'):
                self.split_lines_of_utt[i].append('do-not-include-in-text')
def MergeWithSegment(self, other):
    assert ((self.EndTime() >= other.StartTime()) and (self.StartTime() < other.EndTime()) and (self.split_lines_of_utt is other.split_lines_of_utt))
    orig_self_end_index = self.end_index
    self.debug_str = '({0}/merged-with/{1})'.format(self.debug_str, other.debug_str)
    self.end_index = other.end_index
    self.end_unk_padding = other.end_unk_padding
    self.end_keep_proportion = other.end_keep_proportion
    first_index_of_overlap = min((orig_self_end_index - 1), other.start_index)
    last_index_of_overlap = max((orig_self_end_index - 1), other.start_index)
    num_deleted_words = 0
    for i in range(first_index_of_overlap, (last_index_of_overlap + 1)):
        edit_type = self.split_lines_of_utt[i][7]
        if (edit_type == 'del'):
            num_deleted_words += 1
    if (num_deleted_words > args.max_deleted_words_kept_when_merging):
        for i in range(first_index_of_overlap, (last_index_of_overlap + 1)):
            if (self.split_lines_of_utt[i][7] == 'del'):
                self.split_lines_of_utt[i].append('do-not-include-in-text')