def _make_styled_questions()

in distant_supervision/synthetic_data_creator.py [0:0]


    def _make_styled_questions(self, *, qpa, es_hit, answer_str, rng):
        styled_questions = {}

        styled_questions[QuestionStyle.CLOZE_GENERIC] = self.question_generator.make_cloze_style(
            es_hit['_source']['body'],
            answer_str,
            '[MASK]')

        styled_questions[QuestionStyle.CLOZE_CATEGORY] = self.question_generator.make_cloze_style(
            es_hit['_source']['body'],
            answer_str,
            '[{}]'.format(qpa.phrase.phrase_category))

        templated_strings = self.question_generator.make_template_qg_styles(
            es_hit['_source']['body'],
            answer_str,
            qpa.phrase.phrase_category,
            rng)

        styled_questions.update(templated_strings)

        # unwrap the enum
        return {k.value: v for k, v in styled_questions.items()}