def PossiblyTruncateStartForJunkProportion(self):
    begin_junk_duration = self.start_unk_padding
    first_split_line = self.split_lines_of_utt[self.start_index]
    if IsTainted(first_split_line):
        first_duration = float(first_split_line[3])
        begin_junk_duration += (first_duration * self.start_keep_proportion)
    if (begin_junk_duration == 0.0):
        return
    candidate_start_index = None
    for i in range((self.start_index + 1), (self.end_index - 1)):
        this_split_line = self.split_lines_of_utt[i]
        this_edit_type = this_split_line[7]
        this_ref_word = this_split_line[6]
        if ((this_edit_type == 'sil') or ((this_edit_type == 'cor') and (this_ref_word in non_scored_words))):
            candidate_start_index = i
            candidate_start_time = float(this_split_line[2])
            break
    if (candidate_start_index == None):
        return
    candidate_removed_piece_duration = (candidate_start_time - self.StartTime())
    if ((begin_junk_duration / candidate_removed_piece_duration) < args.max_junk_proportion):
        return
    self.start_index = candidate_start_index
    self.start_unk_padding = 0.0
    self.start_keep_proportion = 1.0
    self.debug_str += ',truncated-start-for-junk'
def PossiblyTruncateStartForJunkProportion(self):
    begin_junk_duration = self.start_unk_padding
    first_split_line = self.split_lines_of_utt[self.start_index]
    if IsTainted(first_split_line):
        first_duration = float(first_split_line[3])
        begin_junk_duration += (first_duration * self.start_keep_proportion)
    if (begin_junk_duration == 0.0):
        return
    candidate_start_index = None
    for i in range((self.start_index + 1), (self.end_index - 1)):
        this_split_line = self.split_lines_of_utt[i]
        this_edit_type = this_split_line[7]
        this_ref_word = this_split_line[6]
        if ((this_edit_type == 'sil') or ((this_edit_type == 'cor') and (this_ref_word in non_scored_words))):
            candidate_start_index = i
            candidate_start_time = float(this_split_line[2])
            break
    if (candidate_start_index == None):
        return
    candidate_removed_piece_duration = (candidate_start_time - self.StartTime())
    if ((begin_junk_duration / candidate_removed_piece_duration) < args.max_junk_proportion):
        return
    self.start_index = candidate_start_index
    self.start_unk_padding = 0.0
    self.start_keep_proportion = 1.0
    self.debug_str += ',truncated-start-for-junk'