def word_tally(word_list):

    """
    Compiles a dictionary of words. Keys are the word, values are the number of occurrences
    of this word in the page.

    :param word_list: list
        List of words

    :return: dictionary
        Dict of words: total
    """

    word_dict = {}

    for word in word_list:
        if not word_dict.get(word):
            word_dict[word] = 1

        else:
            word_dict[word] += 1

    return word_dict