Пример #1
0
 def run(self):
     protobowl_questions = Protobowl.parse_tossups(PROTOBOWL_TOSSUPS_PATH)
     quizdb_tournaments = QuizdbOrg.parse_tournaments(QDB_TOURNAMENTS_PATH)
     quizdb_categories = QuizdbOrg.parse_categories(QDB_CATEGORIES_PATH)
     quizdb_subcategories = QuizdbOrg.parse_subcategories(QDB_SUBCATEGORIES_PATH)
     quizdb_questions = QuizdbOrg.parse_tossups(
         quizdb_tournaments, quizdb_categories, quizdb_subcategories, QDB_TOSSUPS_PATH
     )
     qanta_questions = merge_datasets(protobowl_questions, quizdb_questions)
     with open(safe_path(QANTA_UNMAPPED_DATASET_PATH), 'w') as f:
         json.dump(format_qanta_json(qanta_questions, DS_VERSION), f)
Пример #2
0
 def run(self):
     protobowl_questions = Protobowl.parse_tossups(PROTOBOWL_TOSSUPS_PATH)
     quizdb_tournaments = QuizdbOrg.parse_tournaments(QDB_TOURNAMENTS_PATH)
     quizdb_categories = QuizdbOrg.parse_categories(QDB_CATEGORIES_PATH)
     quizdb_subcategories = QuizdbOrg.parse_subcategories(
         QDB_SUBCATEGORIES_PATH)
     quizdb_questions = QuizdbOrg.parse_tossups(quizdb_tournaments,
                                                quizdb_categories,
                                                quizdb_subcategories,
                                                QDB_TOSSUPS_PATH)
     qanta_questions = merge_datasets(protobowl_questions, quizdb_questions)
     with open(safe_path(QANTA_UNMAPPED_DATASET_PATH), 'w') as f:
         json.dump(format_qanta_json(qanta_questions, DS_VERSION), f)