class_docstr: Tokenizer using spacy under the hood.
  
  Args:
      model: a Spacy V2 model or the name of the model to load.
class_docstr_tok: ["Tokenizer","using","spacy","under","the","hood",".","Args",":","model",":","a","Spacy","V2","model","or","the","name","of","the","model","to","load","."]
code: def __init__(self, model) -> None:
      super().__init__()
  
      try:
          import spacy
          from spacy.language import Language
      except ImportError:
          raise ImportError(
              "Please install Spacy v3.4.4 or better before using the Spacy tokenizer, "
              "otherwise you can use SegtokTokenizer as advanced tokenizer."
          )
  
      if isinstance(model, Language):
          self.model = model
      elif isinstance(model, str):
          self.model = spacy.load(model)
      else:
          raise AssertionError(
              "Unexpected type of parameter model. Please provide a loaded "
              "spacy model or the name of the model to load."
          )
  
imports: import logging
  import sys
  from abc import ABC, abstractmethod
  from typing import Callable, List
  from segtok.segmenter import split_single
  from segtok.tokenizer import split_contractions, word_tokenizer
label_desc: Use image node_id 1 to create a new SpacyTokenizer object from inherited base classes: Tokenizer with example: obj = SpacyTokenizer(model)