def parse(document):
    """ Parse the document string to get the data.
        doc = "1,3,17 5:8.03 6:6.33 79:4.47"
        => returns ("1,3,17", [5, 6, 79], [8.03, 6.33, 4.47])
    """
    raw_parse = document.split()
    classes = raw_parse[0]

    features_and_values = [item.split(':') for item in raw_parse[1:]]
    features = [int(item[0]) for item in features_and_values]
    values = [float(item[1]) for item in features_and_values]

    return classes, features, values