class_docstr: This class uses the external EVALB software for computing a broad range of metrics
  on parse trees. Here, we use it to compute the Precision, Recall and F1 metrics.
  You can download the source for EVALB from here: <https://nlp.cs.nyu.edu/evalb/>.
  
  Note that this software is 20 years old. In order to compile it on modern hardware,
  you may need to remove an `include <malloc.h>` statement in `evalb.c` before it
  will compile.
  
  AllenNLP contains the EVALB software, but you will need to compile it yourself
  before using it because the binary it generates is system dependent. To build it,
  run `make` inside the `allennlp/tools/EVALB` directory.
  
  Note that this metric reads and writes from disk quite a bit. You probably don't
  want to include it in your training loop; instead, you should calculate this on
  a validation set only.
  
  # Parameters
  
  evalb_directory_path : `str`, required.
      The directory containing the EVALB executable.
  evalb_param_filename : `str`, optional (default = `"COLLINS.prm"`)
      The relative name of the EVALB configuration file used when scoring the trees.
      By default, this uses the COLLINS.prm configuration file which comes with EVALB.
      This configuration ignores POS tags and some punctuation labels.
  evalb_num_errors_to_kill : `int`, optional (default = `"10"`)
      The number of errors to tolerate from EVALB before terminating evaluation.
class_docstr_tok: ["This","class","uses","the","external","EVALB","software","for","computing","a","broad","range","of","metrics","on","parse","trees",".","Here",",","we","use","it","to","compute","the","Precision",",","Recall","and","F1","metrics",".","You","can","download","the","source","for","EVALB","from","here",":","<","https",":","\/\/nlp.cs.nyu.edu\/evalb\/",">",".","Note","that","this","software","is","20","years","old",".","In","order","to","compile","it","on","modern","hardware",",","you","may","need","to","remove","an","`","include","<","malloc.h",">","`","statement","in","`","evalb.c","`","before","it","will","compile",".","AllenNLP","contains","the","EVALB","software",",","but","you","will","need","to","compile","it","yourself","before","using","it","because","the","binary","it","generates","is","system","dependent",".","To","build","it",",","run","`","make","`","inside","the","`","allennlp\/tools\/EVALB","`","directory",".","Note","that","this","metric","reads","and","writes","from","disk","quite","a","bit",".","You","probably","don't","want","to","include","it","in","your","training","loop",";","instead",",","you","should","calculate","this","on","a","validation","set","only",".","#","Parameters","evalb_directory_path",":","`","str","`",",","required",".","The","directory","containing","the","EVALB","executable",".","evalb_param_filename",":","`","str","`",",","optional","(","default","=","`","``","COLLINS.prm","''","`",")","The","relative","name","of","the","EVALB","configuration","file","used","when","scoring","the","trees",".","By","default",",","this","uses","the","COLLINS.prm","configuration","file","which","comes","with","EVALB",".","This","configuration","ignores","POS","tags","and","some","punctuation","labels",".","evalb_num_errors_to_kill",":","`","int","`",",","optional","(","default","=","`","``","10","''","`",")","The","number","of","errors","to","tolerate","from","EVALB","before","terminating","evaluation","."]
code: def __init__(
      self,
      evalb_directory_path: str = DEFAULT_EVALB_DIR,
      evalb_param_filename: str = "COLLINS.prm",
      evalb_num_errors_to_kill: int = 10,
  ) -> None:
      self._evalb_directory_path = evalb_directory_path
      self._evalb_program_path = os.path.join(
          evalb_directory_path, "evalb"
      )
      self._evalb_param_path = os.path.join(
          evalb_directory_path, evalb_param_filename
      )
      self._evalb_num_errors_to_kill = evalb_num_errors_to_kill
  
      self._header_line = [
          "ID",
          "Len.",
          "Stat.",
          "Recal",
          "Prec.",
          "Bracket",
          "gold",
          "test",
          "Bracket",
          "Words",
          "Tags",
          "Accracy",
      ]
  
      self._correct_predicted_brackets = 0.0
      self._gold_brackets = 0.0
      self._predicted_brackets = 0.0
  
file_path: allennlp/allennlp/training/metrics/evalb_bracketing_scorer.py
imports: from typing import List
  import logging
  import os
  import tempfile
  import subprocess
  import shutil
  from nltk import Tree
  from allennlp.common.checks import ConfigurationError
  from allennlp.training.metrics.metric import Metric
  from allennlp.nn.util import dist_reduce_sum
label_desc: Use image node_id 1 to create a new EvalbBracketingScorer object from inherited base classes: Metric with example: obj = EvalbBracketingScorer(evalb_directory_path, evalb_param_filename, evalb_num_errors_to_kill)