def convert(s):
    """
    Convert a probability string to a float number.
    :param s: probability string.
    :return: a float probability.
    """
    try:
        return float(s)
    except ValueError:
        num, denom = s.split('/')
        return float(num) / float(denom)