def build_histogram(text):
    """Builds a distribution of the word types and numbers of word tokens."""
    histogram = {}
    words = text.split()
    # make a distribution of word types and count of tokens
    for word in words:
        word = word.lower()
        if word not in histogram:
            histogram[word] = 1
        else:  # word type already seen before in histogram
            histogram[word] += 1
    return histogram