import pandas as pd

data = pd.read_questions('questions.txt')

# this function is used to get printable results
def getResults(questions, fn):
    def getResult(q):
        answer, score, prediction = fn(q)
        return [q, prediction, answer, score]

    return pd.DataFrame(list(map(getResult, questions)), columns=["Q", "Prediction", "A", "Score"])


test_data = [
" Ellen Ripley,Aliens
Jack Sparrow,Pirates of the Caribbean
Han Solo,Star Wars
Gandalf,Lord of the Rings
John McClane,Die Hard
Neo,Matrix
Maximus,Gladiator
Snake Plissken,Escape from New York
Dorothy Gale,The Wizard of Oz
Inigo Montoya,The Princess Bride
Sarah Connor,Terminator"
]
data
