class_docstr: Pipeline component to label spans of text.
  
  DOCS: https://spacy.io/api/spancategorizer
class_docstr_tok: ["Pipeline","component","to","label","spans","of","text",".","DOCS",":","https",":","\/\/spacy.io\/api\/spancategorizer"]
docstr: Modify a batch of Doc objects, using pre-computed scores.
  
  docs (Iterable[Doc]): The documents to modify.
  scores: The scores to set, produced by SpanCategorizer.predict.
  
  DOCS: https://spacy.io/api/spancategorizer#set_annotations
docstr_tok: ["Modify","a","batch","of","Doc","objects",",","using","pre-computed","scores",".","docs","(","Iterable","[","Doc","]",")",":","The","documents","to","modify",".","scores",":","The","scores","to","set",",","produced","by","SpanCategorizer.predict",".","DOCS",":","https",":","\/\/spacy.io\/api\/spancategorizer","#","set_annotations"]
code: def set_annotations(
      self, docs: Iterable[Doc], indices_scores
  ) -> None:
      """Modify a batch of Doc objects, using pre-computed scores.
  
      docs (Iterable[Doc]): The documents to modify.
      scores: The scores to set, produced by SpanCategorizer.predict.
  
      DOCS: https://spacy.io/api/spancategorizer#set_annotations
      """
      indices, scores = indices_scores
      offset = 0
      for i, doc in enumerate(docs):
          indices_i = indices[i].dataXd
          allow_overlap = cast(bool, self.cfg["allow_overlap"])
          if self.cfg["max_positive"] == 1:
              doc.spans[self.key] = self._make_span_group_singlelabel(
                  doc,
                  indices_i,
                  scores[offset : offset + indices.lengths[i]],
                  allow_overlap,
              )
          else:
              doc.spans[self.key] = self._make_span_group_multilabel(
                  doc,
                  indices_i,
                  scores[offset : offset + indices.lengths[i]],
              )
          offset += indices.lengths[i]
  
imports: from dataclasses import dataclass
  from functools import partial
  from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union, cast
  import numpy
  from thinc.api import Config, Model, Ops, Optimizer, get_current_ops, set_dropout_rate
  from thinc.types import Floats2d, Ints1d, Ints2d, Ragged
  from ..compat import Protocol, runtime_checkable
  from ..errors import Errors
  from ..language import Language
  from ..scorer import Scorer
  from ..tokens import Doc, Span, SpanGroup
  from ..training import Example, validate_examples
  from ..util import registry
  from ..vocab import Vocab
  from .trainable_pipe import TrainablePipe
label_desc: Use image node_id 12 for calling the SpanCategorizer obj's underlying member method code with example usage: obj.set_annotations(docs, indices_scores) without return types