def two_sided_f(count1, count2, sum1, sum2):
    """computes an F score like measure"""
    if not (sum1 and sum2):
        print('got empty sums for F scores')
        return 0
    if sum1 < count1 or sum2 < count2:
        print('got empty sums for F scores')
        return 0
    precision = count2 / sum2
    recall = count1 / sum1
    if precision + recall == 0:
        return 0
    return 2 * (precision * recall) / (precision + recall)
