def PossiblySplitSegment(self):
    global non_scored_words, args
    assert ((self.start_unk_padding == 0.0) and (self.end_unk_padding == 0.0) and (self.start_keep_proportion == 1.0) and (self.end_keep_proportion == 1.0))
    segments = []
    cur_start_index = self.start_index
    cur_start_is_split = False
    for index_to_split_at in range((cur_start_index + 1), (self.end_index - 1)):
        this_split_line = self.split_lines_of_utt[index_to_split_at]
        this_duration = float(this_split_line[3])
        this_edit_type = this_split_line[7]
        this_ref_word = this_split_line[6]
        if (((this_edit_type == 'sil') and (this_duration > args.max_internal_silence_length)) or ((this_ref_word in non_scored_words) and (this_duration > args.max_internal_non_scored_length))):
            new_segment = Segment(self.split_lines_of_utt, cur_start_index, (index_to_split_at + 1), self.debug_str)
            if cur_start_is_split:
                new_segment.start_keep_proportion = 0.5
            new_segment.end_keep_proportion = 0.5
            cur_start_is_split = True
            cur_start_index = index_to_split_at
            segments.append(new_segment)
    if (len(segments) == 0):
        segments.append(self)
    else:
        new_segment = Segment(self.split_lines_of_utt, cur_start_index, self.end_index, self.debug_str)
        assert cur_start_is_split
        new_segment.start_keep_proportion = 0.5
        segments.append(new_segment)
    return segments
def PossiblySplitSegment(self):
    global non_scored_words, args
    assert ((self.start_unk_padding == 0.0) and (self.end_unk_padding == 0.0) and (self.start_keep_proportion == 1.0) and (self.end_keep_proportion == 1.0))
    segments = []
    cur_start_index = self.start_index
    cur_start_is_split = False
    for index_to_split_at in range((cur_start_index + 1), (self.end_index - 1)):
        this_split_line = self.split_lines_of_utt[index_to_split_at]
        this_duration = float(this_split_line[3])
        this_edit_type = this_split_line[7]
        this_ref_word = this_split_line[6]
        if (((this_edit_type == 'sil') and (this_duration > args.max_internal_silence_length)) or ((this_ref_word in non_scored_words) and (this_duration > args.max_internal_non_scored_length))):
            new_segment = Segment(self.split_lines_of_utt, cur_start_index, (index_to_split_at + 1), self.debug_str)
            if cur_start_is_split:
                new_segment.start_keep_proportion = 0.5
            new_segment.end_keep_proportion = 0.5
            cur_start_is_split = True
            cur_start_index = index_to_split_at
            segments.append(new_segment)
    if (len(segments) == 0):
        segments.append(self)
    else:
        new_segment = Segment(self.split_lines_of_utt, cur_start_index, self.end_index, self.debug_str)
        assert cur_start_is_split
        new_segment.start_keep_proportion = 0.5
        segments.append(new_segment)
    return segments