def PossiblyTruncateBoundaries(self):
    for b in [True, False]:
        if b:
            this_index = self.start_index
        else:
            this_index = (self.end_index - 1)
        this_split_line = self.split_lines_of_utt[this_index]
        truncated_duration = None
        this_duration = float(this_split_line[3])
        this_edit = this_split_line[7]
        this_ref_word = this_split_line[6]
        if ((this_edit == 'sil') and (this_duration > args.max_edge_silence_length)):
            truncated_duration = args.max_edge_silence_length
        elif ((this_ref_word in non_scored_words) and (this_duration > args.max_edge_non_scored_length)):
            truncated_duration = args.max_edge_non_scored_length
        if (truncated_duration != None):
            keep_proportion = (truncated_duration / this_duration)
            if b:
                self.start_keep_proportion = keep_proportion
            else:
                self.end_keep_proportion = keep_proportion
def PossiblyTruncateBoundaries(self):
    for b in [True, False]:
        if b:
            this_index = self.start_index
        else:
            this_index = (self.end_index - 1)
        this_split_line = self.split_lines_of_utt[this_index]
        truncated_duration = None
        this_duration = float(this_split_line[3])
        this_edit = this_split_line[7]
        this_ref_word = this_split_line[6]
        if ((this_edit == 'sil') and (this_duration > args.max_edge_silence_length)):
            truncated_duration = args.max_edge_silence_length
        elif ((this_ref_word in non_scored_words) and (this_duration > args.max_edge_non_scored_length)):
            truncated_duration = args.max_edge_non_scored_length
        if (truncated_duration != None):
            keep_proportion = (truncated_duration / this_duration)
            if b:
                self.start_keep_proportion = keep_proportion
            else:
                self.end_keep_proportion = keep_proportion