def calculate_metrics(pred_correct_cnt, pred_cnt, correct_cnt):
    """calculate_metrics calculates metrics: precision, recall, f1-score.

    Args:
        pred_correct_cnt (int): the number of corrected prediction
        pred_cnt (int): the number of prediction
        correct_cnt (int): the numbert of truth

    Returns:
        tuple: precision, recall, f1-score
    """

    tp, fp, fn = pred_correct_cnt, pred_cnt - pred_correct_cnt, correct_cnt - pred_correct_cnt
    p = 0 if tp + fp == 0 else (tp / (tp + fp))
    r = 0 if tp + fn == 0 else (tp / (tp + fn))
    f = 0 if p + r == 0 else (2 * p * r / (p + r))
    return p, r, f