from typing import Counter


def separate_prob(data):
    """
    Convert a list of SVO triples with missing arguments,
    to three counts of tuples
    :param data: list of triples
    :return: {SVO}, {SV}, {VO}
    """
    svo, sv, vo = Counter(), Counter(), Counter()
    for verb, subj, obj in data:
        if subj is None:
            vo[verb, obj] += 1
        elif obj is None:
            sv[subj, verb] += 1
        else:
            svo[subj, verb, obj] += 1
    totals = [sum(c.values()) for c in (svo, sv, vo)]
    probs = [{tup: num/totals[i] for tup, num in c.items()} for i,c in enumerate((svo, sv, vo))]
    return probs