code: def compute_f(match_num, test_num, gold_num):
      
      if test_num == 0 or gold_num == 0:
          return 0.00, 0.00, 0.00
      precision = float(match_num) / float(test_num)
      recall = float(match_num) / float(gold_num)
      if (precision + recall) != 0:
          f_score = 2 * precision * recall / (precision + recall)
          if veryVerbose:
              print("F-score:", f_score, file=DEBUG_LOG)
          return precision, recall, f_score
      else:
          if veryVerbose:
              print("F-score:", "0.0", file=DEBUG_LOG)
          return precision, recall, 0.00
docs: Compute the f-score based on the matching triple number,
                                   triple number of AMR set 1,
                                   triple number of AMR set 2
      Args:
          match_num: matching triple number
          test_num:  triple number of AMR 1 (test file)
          gold_num:  triple number of AMR 2 (gold file)
      Returns:
          precision: match_num/test_num
          recall: match_num/gold_num
          f_score: 2*precision*recall/(precision+recall)