(question_object)
return answers
Retrieve a list of answers from a question as encoded in the WebQuestions dataset.

    :param question_object: A question encoded as a Json object
    :return: A list of answers as strings
    >>> get_answers_from_question({"url": "http://www.freebase.com/view/en/natalie_portman", "targetValue": "(list (description \\"Padm\u00e9 Amidala\\"))", "utterance": "what character did natalie portman play in star wars?"})
    ['Padmé Amidala']
    >>> get_answers_from_question({"targetValue": "(list (description Abduction) (description Eclipse) (description \\"Valentine's Day\\") (description \\"New Moon\\"))"})
    ['Abduction', 'Eclipse', "Valentine's Day", 'New Moon']
    >>> get_answers_from_question({'answers': ['http://www.wikidata.org/entity/Q16759', \
    'http://www.wikidata.org/entity/Q190972','http://www.wikidata.org/entity/Q231093',],'utterance': 'Which actors play in Big Bang Theory?'})
    ['Q16759', 'Q190972', 'Q231093']
Retrieve a list of answers from a question as encoded in the WebQuestions dataset.
Retrieve a list of answers from a question as encoded in the WebQuestions dataset .
def get_answers_from_question(question_object):
    """
    Retrieve a list of answers from a question as encoded in the WebQuestions dataset.

    :param question_object: A question encoded as a Json object
    :return: A list of answers as strings
    >>> get_answers_from_question({"url": "http://www.freebase.com/view/en/natalie_portman", "targetValue": "(list (description \\"Padm\u00e9 Amidala\\"))", "utterance": "what character did natalie portman play in star wars?"})
    ['Padmé Amidala']
    >>> get_answers_from_question({"targetValue": "(list (description Abduction) (description Eclipse) (description \\"Valentine's Day\\") (description \\"New Moon\\"))"})
    ['Abduction', 'Eclipse', "Valentine's Day", 'New Moon']
    >>> get_answers_from_question({'answers': ['http://www.wikidata.org/entity/Q16759', \
    'http://www.wikidata.org/entity/Q190972','http://www.wikidata.org/entity/Q231093',],'utterance': 'Which actors play in Big Bang Theory?'})
    ['Q16759', 'Q190972', 'Q231093']
    """
    if 'answers' in question_object or "answer" in question_object:
        answers = []
        for a in question_object.get('answers', question_object.get('answer')):
            if a and a.startswith(scheme.WIKIDATA_ENTITY_PREFIX):
                a = a.replace(scheme.WIKIDATA_ENTITY_PREFIX, "")
            answers.append(a)
        return answers
    answers = re.findall("\(description \"?(.*?)\"?\)", question_object.get('targetValue'))
    if len(answers) == 1 and answers[0].startswith("http://"):
        return []
    return answers
def get_answers_from_question ( question_object ) : if 'answers' in question_object or "answer" in question_object : answers = [ ] for a in question_object . get ( 'answers' , question_object . get ( 'answer' ) ) : if a and a . startswith ( scheme . WIKIDATA_ENTITY_PREFIX ) : a = a . replace ( scheme . WIKIDATA_ENTITY_PREFIX , "" ) answers . append ( a ) return answers answers = re . findall ( "\(description \"?(.*?)\"?\)" , question_object . get ( 'targetValue' ) ) if len ( answers ) == 1 and answers [ 0 ] . startswith ( "http://" ) : return [ ] return answers