class_docstr: spaCy backend for NER.
class_docstr_tok: ["spaCy","backend","for","NER","."]
docstr: Construct a spaCy NER backend.
  
  :param model_name_or_path:
      Name of the model or a path to the spaCy
      model on the local disk.
  :param device_id:
      Identifier of the device on which the backend
      is executed.
  
      To execute on the CPU, pass a value of `-1`.
      To execute on the GPU, pass the GPU identifier.
  :param pipeline_kwargs:
      Keyword arguments passed to the pipeline. The
      pipeline can override these arguments.
docstr_tok: ["Construct","a","spaCy","NER","backend",".",":","param","model_name_or_path",":","Name","of","the","model","or","a","path","to","the","spaCy","model","on","the","local","disk",".",":","param","device_id",":","Identifier","of","the","device","on","which","the","backend","is","executed",".","To","execute","on","the","CPU",",","pass","a","value","of","`","-1","`",".","To","execute","on","the","GPU",",","pass","the","GPU","identifier",".",":","param","pipeline_kwargs",":","Keyword","arguments","passed","to","the","pipeline",".","The","pipeline","can","override","these","arguments","."]
code: def __init__(
      self,
      *,
      model_name_or_path: str,
      device_id: int,
      pipeline_kwargs: Optional[Dict[str, Any]] = None,
  ) -> None:
      """
      Construct a spaCy NER backend.
  
      :param model_name_or_path:
          Name of the model or a path to the spaCy
          model on the local disk.
      :param device_id:
          Identifier of the device on which the backend
          is executed.
  
          To execute on the CPU, pass a value of `-1`.
          To execute on the GPU, pass the GPU identifier.
      :param pipeline_kwargs:
          Keyword arguments passed to the pipeline. The
          pipeline can override these arguments.
      """
      super().__init__(
          NamedEntityExtractorBackend.SPACY, pipeline_kwargs
      )
  
      spacy_import.check()
  
      self._model_name_or_path = model_name_or_path
      self._device_id = device_id
  
      self.pipeline: Optional[SpacyPipeline] = None
  
imports: from abc import ABC, abstractmethod
  from contextlib import contextmanager
  from dataclasses import dataclass
  from enum import Enum, EnumMeta
  from typing import Any, Dict, List, Optional, Union
  from ...None import ComponentError, DeserializationError, Document, component, default_from_dict, default_to_dict
  from ...lazy_imports import LazyImport
label_desc: Use image node_id 1 to create a new _SpacyBackend object from inherited base classes: _NerBackend with example: obj = _SpacyBackend()