def question_top_guesses(text, deep, guess_connection, id, page, num_guesses=4):
    """
    Return the top guesses for this page
    """

    c = guess_connection.cursor()
    command = ('select page from guesses where sentence = 2 and token = 0 and question = %i ' +
               'order by score desc limit %i') % (id, num_guesses+1)
    c.execute(command)

    choices = set([page])
    for ii, in c:
        if len(choices) < num_guesses and not ii in choices:
            choices.add(ii)

    # If we don't have enough guesses, generate more
    new_guesses = deep.text_guess(text)

    # sort the guesses and add them
    for guess, score in sorted(new_guesses.items(), key=operator.itemgetter(1), reverse=True):
        if num_guesses < len(choices) and not guess in choices:
            choices.add(guess)

    return choices
dataset/ETHPy150Open Pinafore/qb/reporting/build_science_mc.py/question_top_guesses/swapped operands of `<`