def analyse(text):
    """
    Return a dictionary with the number of occurrences for each character in the given string.
    """

    frequencies = {}
    for c in text:
        if c in frequencies:
            frequencies[c] += 1
        else:
            frequencies[c] = 1
    return frequencies