class_docstr: The Conll SRL metrics are based on exact span matching. This metric
  implements span-based precision and recall metrics for a BIO tagging
  scheme. It will produce precision, recall and F1 measures per tag, as
  well as overall statistics. Note that the implementation of this metric
  is not exactly the same as the perl script used to evaluate the CONLL 2005
  data - particularly, it does not consider continuations or reference spans
  as constituents of the original span. However, it is a close proxy, which
  can be helpful for judging model performance during training. This metric
  works properly when the spans are unlabeled (i.e., your labels are
  simply "B", "I", "O" if using the "BIO" label encoding).
class_docstr_tok: ["The","Conll","SRL","metrics","are","based","on","exact","span","matching",".","This","metric","implements","span-based","precision","and","recall","metrics","for","a","BIO","tagging","scheme",".","It","will","produce","precision",",","recall","and","F1","measures","per","tag",",","as","well","as","overall","statistics",".","Note","that","the","implementation","of","this","metric","is","not","exactly","the","same","as","the","perl","script","used","to","evaluate","the","CONLL","2005","data","-","particularly",",","it","does","not","consider","continuations","or","reference","spans","as","constituents","of","the","original","span",".","However",",","it","is","a","close","proxy",",","which","can","be","helpful","for","judging","model","performance","during","training",".","This","metric","works","properly","when","the","spans","are","unlabeled","(","i.e.",",","your","labels","are","simply","``","B","''",",","``","I","''",",","``","O","''","if","using","the","``","BIO","''","label","encoding",")","."]
code: def _compute_metrics(
      true_positives: int, false_positives: int, false_negatives: int
  ):
      precision = true_positives / (
          true_positives + false_positives + 1e-13
      )
      recall = true_positives / (
          true_positives + false_negatives + 1e-13
      )
      f1_measure = (
          2.0 * (precision * recall) / (precision + recall + 1e-13)
      )
      return precision, recall, f1_measure
  
file_path: allennlp/allennlp/training/metrics/span_based_f1_measure.py
imports: from typing import Dict, List, Optional, Set, Callable
  from collections import defaultdict
  import torch
  from allennlp.common.util import is_distributed
  from allennlp.common.checks import ConfigurationError
  from allennlp.nn.util import get_lengths_from_binary_sequence_mask
  from allennlp.data.vocabulary import Vocabulary
  from allennlp.training.metrics.metric import Metric
  from allennlp.data.dataset_readers.dataset_utils.span_utils import bio_tags_to_spans, bioul_tags_to_spans, iob1_tags_to_spans, bmes_tags_to_spans, TypedStringSpan
label_desc: Use image node_id 5 for calling the SpanBasedF1Measure obj's underlying member method code with example usage: obj._compute_metrics(true_positives, false_positives, false_negatives) and returns: precision,  recall,  f1_measure