class_docstr: Mostly borrowed from <https://github.com/clarkkev/deep-coref/blob/master/evaluation.py>
class_docstr_tok: ["Mostly","borrowed","from","<","https",":","\/\/github.com\/clarkkev\/deep-coref\/blob\/master\/evaluation.py",">"]
docstr: Subroutine for ceafe. Computes the mention F measure between gold and
  predicted mentions in a cluster.
docstr_tok: ["Subroutine","for","ceafe",".","Computes","the","mention","F","measure","between","gold","and","predicted","mentions","in","a","cluster","."]
code: def phi4(gold_clustering, predicted_clustering):
      """
      Subroutine for ceafe. Computes the mention F measure between gold and
      predicted mentions in a cluster.
      """
      return (
          2
          * len(
              [
                  mention
                  for mention in gold_clustering
                  if mention in predicted_clustering
              ]
          )
          / float(len(gold_clustering) + len(predicted_clustering))
      )
  
imports: from __future__ import division
  from __future__ import absolute_import
  from collections import Counter
  from sklearn.utils.linear_assignment_ import linear_assignment
  import numpy
  import torch
  from allennlp.training.metrics.metric import Metric
label_desc: Use image node_id 9 for calling the Scorer obj's underlying member method code with example usage: obj.phi4(gold_clustering, predicted_clustering) and returns: unknown