class_docstr: Tokenize or lemmatize a list of documents. Default spacy model is **en_core_web_sm**.
  Return a list of tokens or lemmas for a whole document.
  If is called onto ``List[str]``, performs detokenizing procedure.
  
  Args:
      disable: spacy pipeline elements to disable, serves a purpose of performing; if nothing
      filter_stopwords: whether to ignore stopwords during tokenizing/lemmatizing and ngrams creation
      batch_size: a batch size for spaCy buffering
      ngram_range: size of ngrams to create; only unigrams are returned by default
      lemmas: whether to perform lemmatizing or not
      lowercase: whether to perform lowercasing or not; is performed by default by :meth:`_tokenize`
       and :meth:`_lemmatize` methods
      alphas_only: whether to filter out non-alpha tokens; is performed by default by
       :meth:`_filter` method
      spacy_model: a string name of spacy model to use; DeepPavlov searches for this name in
       downloaded spacy models; default model is **en_core_web_sm**, it downloads automatically
       during DeepPavlov installation
  
  
  Attributes:
      stopwords: a list of stopwords that should be ignored during tokenizing/lemmatizing
       and ngrams creation
      model: a loaded spacy model
      batch_size: a batch size for spaCy buffering
      ngram_range: size of ngrams to create; only unigrams are returned by default
      lemmas: whether to perform lemmatizing or not
      lowercase: whether to perform lowercasing or not; is performed by default by :meth:`_tokenize`
       and :meth:`_lemmatize` methods
      alphas_only: whether to filter out non-alpha tokens; is performed by default by :meth:`_filter`
       method
docstr: Lemmatize a list of documents.
  
   Args:
       data: a list of documents to tokenize
       ngram_range: size of ngrams to create; only unigrams are returned by default
       batch_size: a batch size for spaCy buffering
  
  Yields:
      list of lists of ngramized lemmas or list of detokenized strings
  
   Returns:
       None
  
   
docstr_tok: ["Lemmatize","a","list","of","documents",".","Args",":","data",":","a","list","of","documents","to","tokenize","ngram_range",":","size","of","ngrams","to","create",";","only","unigrams","are","returned","by","default","batch_size",":","a","batch","size","for","spaCy","buffering","Yields",":","list","of","lists","of","ngramized","lemmas","or","list","of","detokenized","strings","Returns",":","None"]
code: def _lemmatize(
      self,
      data: List[str],
      ngram_range: Optional[Tuple[int, int]] = None,
      batch_size: int = 10000,
      lowercase: bool = True,
  ) -> Generator[List[str], Any, None]:
      """Lemmatize a list of documents.
  
       Args:
           data: a list of documents to tokenize
           ngram_range: size of ngrams to create; only unigrams are returned by default
           batch_size: a batch size for spaCy buffering
  
      Yields:
          list of lists of ngramized lemmas or list of detokenized strings
  
       Returns:
           None
  
      """
      _batch_size = self.batch_size or batch_size
      _ngram_range = ngram_range or self.ngram_range
  
      if self.lowercase is None:
          _lowercase = lowercase
      else:
          _lowercase = self.lowercase
  
      for i, doc in enumerate(
          self.model.pipe(data, batch_size=_batch_size)
      ):
          lemmas = [t.lemma_ for t in doc]
          if _lowercase:
              lemmas = [t.lower() for t in lemmas]
          lemm_doc = " ".join(lemmas)
          filtered = self._filter(lemmas)
          processed_doc = ngramize(
              filtered, ngram_range=_ngram_range, doc=lemm_doc
          )
          yield from processed_doc
  
file_path: DeepPavlov/deeppavlov/models/tokenizers/spacy_tokenizer.py
imports: from logging import getLogger
  from typing import List, Generator, Any, Optional, Union, Tuple, Iterable
  import spacy
  import spacy.language
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.models.component import Component
  from deeppavlov.models.tokenizers.utils import detokenize, ngramize
label_desc: Use image node_id 4 for calling the StreamSpacyTokenizer obj's underlying member method code with example usage: obj._lemmatize(data, ngram_range, batch_size, lowercase) without return types