code: def official_conll_eval(
      gold_path, predicted_path, metric, official_stdout=True
  ):
      cmd = [
          "conll-2012/scorer/v8.01/scorer.pl",
          metric,
          gold_path,
          predicted_path,
          "none",
      ]
      process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
      stdout, stderr = process.communicate()
      process.wait()
  
      stdout = stdout.decode("utf-8")
      if stderr is not None:
          logger.error(stderr)
  
      if official_stdout:
          logger.info("Official result for {}".format(metric))
          logger.info(stdout)
  
      coref_results_match = re.match(COREF_RESULTS_REGEX, stdout)
      recall = float(coref_results_match.group(1))
      precision = float(coref_results_match.group(2))
      f1 = float(coref_results_match.group(3))
      return {"r": recall, "p": precision, "f": f1}
  
file_path: DeepKE/src/deepke/triple_extraction/ASP/metrics/conll.py
imports: import re
  import tempfile
  import subprocess
  import operator
  import collections
  import logging
label_desc: Use image node_id 3 for calling a global function with example usage: official_conll_eval(gold_path, predicted_path, metric, official_stdout) and returns: dict