def measure_f_score(precision, recall):
    """
    A function to measure the f_score, given precision and recall
    F = 2PR/(P+R), where P = precision, R = recall and F = f_score
    """
    num = 2*precision*recall
    den = precision + recall
    # Handling division by zero case, which is caused by precision = recall = 0
    if den == 0:
        return 0
    return num/den