def full_info()

in python/passage_retrieval_processing.py [0:0]


def full_info(answers, question_text, keep_markup):
    acc_answers, sugg_answers = [], []
    for answer in answers:
        if answer["status"] == "acceptedAnswer":
            if "text_markup" in answer.keys():
                answer_text = extract_text(answer["text_markup"], keep_markup)
                acc_answers.append(answer_text)
        if answer["status"] == "suggestedAnswer":
            if "upvote_count" in answer.keys():
                if int(clean_votes(answer["upvote_count"])) < 2:
                    if "text_markup" in answer.keys():
                        answer_text = extract_text(answer["text_markup"], keep_markup)
                        sugg_answers.append(answer_text)
                if int(clean_votes(answer["upvote_count"])) >= 2:
                    if "text_markup" in answer.keys():
                        answer_text = extract_text(answer["text_markup"], keep_markup)
                        acc_answers.append(answer_text)
    acc_answers, sugg_answers, has_non_empty_answer = clean_answer(
        acc_answers, sugg_answers
    )
    if acc_answers is not None and len(acc_answers) > 0:
        if has_non_empty_answer:
            return {
                "question": question_text,
                "answers": [],
                "positive_ctxs": [
                    {"title": "", "text": acc_answer} for acc_answer in acc_answers
                ],
                "hard_negative_ctxs": [
                    {"title": "", "text": sugg_answer} for sugg_answer in sugg_answers
                ],
            }