question_generation_model.py [432:458]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            prob = st_wd[1]
            st_wd = st_wd[0]

            intermediate_question = [self.datasets.idx_to_word[i] for i in st_wd]

            final_question = []

            for i in intermediate_question:
                if i != '<END>':
                    final_question.append(i)
                else:
                    break

            final_question = ' '.join(final_question[1:])

            if prob > max_prob:
                max_prob = prob
                final_candidate = final_question
            if prob > thresh:
                if final_question in candidates:
                    if prob > candidates[final_question]:
                        candidates[final_question] = prob
                else:
                    candidates[final_question] = prob

            if final_question not in self.datasets.unique_train_questions:
                unique_questions_not_seen_training_data.add(final_question)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



question_generation_model.py [603:629]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            prob = st_wd[1]
            st_wd = st_wd[0]

            intermediate_question = [self.datasets.idx_to_word[i] for i in st_wd]

            final_question = []

            for i in intermediate_question:
                if i != '<END>':
                    final_question.append(i)
                else:
                    break

            final_question = ' '.join(final_question[1:])

            if prob > max_prob:
                max_prob = prob
                final_candidate = final_question
            if prob > thresh:
                if final_question in candidates:
                    if prob > candidates[final_question]:
                        candidates[final_question] = prob
                else:
                    candidates[final_question] = prob

            if final_question not in self.datasets.unique_train_questions:
                    unique_questions_not_seen_training_data.add(final_question)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



