def compute_p_r_f1(gold_tuples, pred_tuples):
    """
    Compute Precision/Recall/F1 score for the predicted tuples.

    Parameters
    ----------
    gold_tuples : set
        Set of gold-standard 4-tuples.
    pred_tuples : set
        Set of predicted 4-tuples.

    Returns
    -------
    scores : tuple
        A 3-tuple containing (precision, recall, f1).
    """
    precision = float(len(gold_tuples & pred_tuples)) / len(pred_tuples)
    recall = float(len(gold_tuples & pred_tuples)) / len(gold_tuples)
    f1 = 2.0 * precision * recall / (precision + recall)
    return precision, recall, f1