class_docstr: Sentence Splitter using Spacy.
  
  Implementation of :class:`SentenceSplitter`, using models from Spacy.
  
  Args:
      model: Spacy V2 model or the name of the model to load.
      tokenizer: Custom tokenizer to use (default :class:`SpacyTokenizer`)
class_docstr_tok: ["Sentence","Splitter","using","Spacy",".","Implementation","of",":","class",":","`","SentenceSplitter","`",",","using","models","from","Spacy",".","Args",":","model",":","Spacy","V2","model","or","the","name","of","the","model","to","load",".","tokenizer",":","Custom","tokenizer","to","use","(","default",":","class",":","`","SpacyTokenizer","`",")"]
code: def __init__(
      self,
      model: Union[Any, str],
      tokenizer: Optional[Tokenizer] = None,
  ) -> None:
      super().__init__()
  
      try:
          import spacy
          from spacy.language import Language
      except ImportError:
          raise ImportError(
              "Please install spacy v3.4.4 or higher before using the SpacySentenceSplitter, "
              "otherwise you can use SegtokSentenceSplitter as alternative implementation."
          )
  
      if isinstance(model, Language):
          self.model: Language = model
      else:
          assert isinstance(model, str)
          self.model = spacy.load(model)
  
      if tokenizer is None:
          self._tokenizer: Tokenizer = SpacyTokenizer("en_core_sci_sm")
      else:
          self._tokenizer = tokenizer
  
imports: from abc import ABC, abstractmethod
  from typing import Any, List, Optional, Union
  from segtok.segmenter import split_multi
  from flair.data import Sentence
  from flair.tokenization import SciSpacyTokenizer, SegtokTokenizer, SpacyTokenizer, Tokenizer
label_desc: Use image node_id 1 to create a new SpacySentenceSplitter object from inherited base classes: SentenceSplitter with example: obj = SpacySentenceSplitter(model, tokenizer)