import math


def element_entropy(value):
    """
    Compute entropy of given element string.

    :param value: String value to compute entropy
    :return: Computed entropy of a given string
    """
    # Get probability of chars in string
    prob = [ float(value.count(c)) / len(value) for c in dict.fromkeys(list(value)) ]
    # Calculate and return the entropy
    return - sum([p * math.log(p) / math.log(2.0) for p in prob])