Example #1
0
def document_retrieval(logger):
    # override args
    """
    logger.info("Starting document retrieval for training set...")
    document_retrieval_main(Config.db_path, Config.document_k_wiki, Config.raw_training_set, Config.training_doc_file,
                            Config.document_add_claim, Config.document_parallel)
    logger.info("Finished document retrieval for training set.")
    logger.info("Starting document retrieval for dev set...")
    document_retrieval_main(Config.db_path, Config.document_k_wiki, Config.raw_dev_set, Config.dev_doc_file,
                            Config.document_add_claim, Config.document_parallel)
    logger.info("Finished document retrieval for dev set.")
    logger.info("Starting document retrieval for test set...")
    document_retrieval_main(Config.db_path, Config.document_k_wiki, Config.raw_test_set, Config.test_doc_file,
                            Config.document_add_claim, Config.document_parallel)
    """
    document_retrieval_main(args.database, 7, args.infile, args.outfile, args.path_wiki_titles, True, True)
Example #2
0
def document_retrieval(logger):
    logger.info("Starting document retrieval for training set...")
    document_retrieval_main(Config.db_path, Config.document_k_wiki,
                            Config.raw_training_set, Config.training_doc_file,
                            Config.document_add_claim,
                            Config.document_parallel)
    logger.info("Finished document retrieval for training set.")
    logger.info("Starting document retrieval for dev set...")
    document_retrieval_main(Config.db_path, Config.document_k_wiki,
                            Config.raw_dev_set, Config.dev_doc_file,
                            Config.document_add_claim,
                            Config.document_parallel)
    logger.info("Finished document retrieval for dev set.")
    logger.info("Starting document retrieval for test set...")
    document_retrieval_main(Config.db_path, Config.document_k_wiki,
                            Config.raw_test_set, Config.test_doc_file,
                            Config.document_add_claim,
                            Config.document_parallel)
def document_retrieval(logger, mode: Mode = Mode.PIPELINE):
    if mode in {Mode.PIPELINE, Mode.PREDICT_ALL_DATASETS}:
        logger.info("Starting document retrieval for training set...")
        document_retrieval_main(Config.db_path, Config.document_k_wiki,
                                Config.raw_training_set,
                                Config.training_doc_file,
                                Config.document_add_claim,
                                Config.document_parallel)
        logger.info("Finished document retrieval for training set.")
        logger.info("Starting document retrieval for dev set...")
        document_retrieval_main(Config.db_path, Config.document_k_wiki,
                                Config.raw_dev_set, Config.dev_doc_file,
                                Config.document_add_claim,
                                Config.document_parallel)
        logger.info("Finished document retrieval for dev set.")
    logger.info("Starting document retrieval for test set...")
    document_retrieval_main(Config.db_path, Config.document_k_wiki,
                            Config.raw_test_set, Config.test_doc_file,
                            Config.document_add_claim,
                            Config.document_parallel)
    logger.info("Finished document retrieval for test set.")