class_docstr: Compute evaluation scores.
class_docstr_tok: ["Compute","evaluation","scores","."]
docstr: Initialize the Scorer.
  
  DOCS: https://spacy.io/api/scorer#init
docstr_tok: ["Initialize","the","Scorer",".","DOCS",":","https",":","\/\/spacy.io\/api\/scorer","#","init"]
code: def __init__(
      self,
      nlp: Optional["Language"] = None,
      default_lang: str = "xx",
      default_pipeline: Iterable[str] = DEFAULT_PIPELINE,
      **cfg,
  ) -> None:
      """Initialize the Scorer.
  
      DOCS: https://spacy.io/api/scorer#init
      """
      self.cfg = cfg
      if nlp:
          self.nlp = nlp
      else:
          nlp = get_lang_class(default_lang)()
          for pipe in default_pipeline:
              nlp.add_pipe(pipe)
          self.nlp = nlp
  
imports: from collections import defaultdict
  from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional, Set, Tuple
  import numpy
  from .errors import Errors
  from .morphology import Morphology
  from .tokens import Doc, Span, Token
  from .training import Example
  from .util import SimpleFrozenList, get_lang_class
label_desc: Use image node_id 1 to create a new Scorer object  with example: obj = Scorer(nlp, default_lang, default_pipeline)