def generate_word_grams(text):
    """Generate a lookup of words mapped to the next occurring word, and
    we can use this to generate new text based on occurrence.
    """
    words = text.split()
    wordgrams = {}

    # Add each word to the lookup
    for i in range(len(words) - 1):

        # Have lookup be all lowercase version
        word = words[i].lower()

        if word not in wordgrams:
            wordgrams[word] = []

        # Each entry should have the next occurring word
        wordgrams[word].append(words[i + 1])

    # The last word potentially doesn't have any following
    word = words[len(words) - 1].lower()
    if word not in wordgrams:
        wordgrams[word] = []
    return wordgrams