def PossiblyAddUnkPadding(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]
        this_start_time = float(this_split_line[2])
        this_ref_word = this_split_line[6]
        this_edit = this_split_line[7]
        if ((this_edit == 'cor') and (not (this_ref_word in non_scored_words))):
            if b:
                unk_padding = args.unk_padding
                if (unk_padding > this_start_time):
                    unk_padding = this_start_time
                if (unk_padding < (0.5 * args.unk_padding)):
                    unk_padding = 0.0
                self.start_unk_padding = unk_padding
            else:
                this_end_time = (this_start_time + float(this_split_line[3]))
                last_line = self.split_lines_of_utt[(- 1)]
                utterance_end_time = (float(last_line[2]) + float(last_line[3]))
                max_allowable_padding = (utterance_end_time - this_end_time)
                assert (max_allowable_padding > (- 0.01))
                unk_padding = args.unk_padding
                if (unk_padding > max_allowable_padding):
                    unk_padding = max_allowable_padding
                if (unk_padding < (0.5 * args.unk_padding)):
                    unk_padding = 0.0
                self.end_unk_padding = unk_padding
def PossiblyAddUnkPadding(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]
        this_start_time = float(this_split_line[2])
        this_ref_word = this_split_line[6]
        this_edit = this_split_line[7]
        if ((this_edit == 'cor') and (not (this_ref_word in non_scored_words))):
            if b:
                unk_padding = args.unk_padding
                if (unk_padding > this_start_time):
                    unk_padding = this_start_time
                if (unk_padding < (0.5 * args.unk_padding)):
                    unk_padding = 0.0
                self.start_unk_padding = unk_padding
            else:
                this_end_time = (this_start_time + float(this_split_line[3]))
                last_line = self.split_lines_of_utt[(- 1)]
                utterance_end_time = (float(last_line[2]) + float(last_line[3]))
                max_allowable_padding = (utterance_end_time - this_end_time)
                assert (max_allowable_padding > (- 0.01))
                unk_padding = args.unk_padding
                if (unk_padding > max_allowable_padding):
                    unk_padding = max_allowable_padding
                if (unk_padding < (0.5 * args.unk_padding)):
                    unk_padding = 0.0
                self.end_unk_padding = unk_padding