original_docstring: Load questions into a list of question,answer_list pairs.  The
    trailing ? from each question is discarded to simplify tokenization.
    
docstring: Load questions into a list of question,answer_list pairs.  The
  trailing . from each question is discarded to simplify tokenization.
docstring_tokens: Load questions into a list of question answer_list pairs . The trailing . from each question is discarded to simplify tokenization .
code: def load_questions(stem,em):
    """Load questions into a list of question,answer_list pairs.  The
    trailing ? from each question is discarded to simplify tokenization.
    """
    result = []
    for line in open('movieqa/questions/wiki_entities/wiki-entities_qa_%s.txt' % stem):
      line = trim_digits(line.strip())
      question,answer_part = line.split("\t")
      if question[-1]=="?": question = question[:-1]
      else: logging.warn('weird question %r' % question)
      answers = em.as_entity_list(answer_part, keep_nonentities=False)
      result.append((question,answers))
    print('loaded',len(result),'qas')
    return result
code_tokens: def load_questions ( stem , em ) : result = [ ] for line in open ( 'movieqa/questions/wiki_entities/wiki-entities_qa_%s.txt' % stem ) : line = trim_digits ( line . strip ( ) ) question , answer_part = line . split ( "\t" ) if question [ - 1 ] == "?" : question = question [ : - 1 ] else : logging . warn ( 'weird question %r' % question ) answers = em . as_entity_list ( answer_part , keep_nonentities = False ) result . append ( ( question , answers ) ) print ( 'loaded' , len ( result ) , 'qas' ) return result
short_docstring: Load questions into a list of question,answer_list pairs.
short_docstring_tokens: Load questions into a list of question answer_list pairs .
comment: """Load questions into a list of question,answer_list pairs.  The
    trailing ? from each question is discarded to simplify tokenization.
    """