class_docstr: Provides common code for text vectorizers (tokenization logic).
class_docstr_tok: ["Provides","common","code","for","text","vectorizers","(","tokenization","logic",")","."]
docstr: This returns the ngrams for the string series
  
  Parameters
  ----------
  str_series : (cudf.Series)
      String series to tokenize
  ngram_size : int
      Gram level to get (1 for unigram, 2 for bigram etc)
  doc_id_sr : cudf.Series
      Int series containing documents ids
docstr_tok: ["This","returns","the","ngrams","for","the","string","series","Parameters","--","--","--","--","--","str_series",":","(","cudf.Series",")","String","series","to","tokenize","ngram_size",":","int","Gram","level","to","get","(","1","for","unigram",",","2","for","bigram","etc",")","doc_id_sr",":","cudf.Series","Int","series","containing","documents","ids"]
code: def get_ngrams(self, str_series, ngram_size, doc_id_sr):
      """
      This returns the ngrams for the string series
  
      Parameters
      ----------
      str_series : (cudf.Series)
          String series to tokenize
      ngram_size : int
          Gram level to get (1 for unigram, 2 for bigram etc)
      doc_id_sr : cudf.Series
          Int series containing documents ids
      """
  
      if self.analyzer == "word":
          token_count_sr = str_series.str.token_count(self.delimiter)
          ngram_sr = str_series.str.ngrams_tokenize(
              n=ngram_size, separator=" ", delimiter=self.delimiter
          )
          # formula to count ngrams given number of tokens x per doc: x-(n-1)
          ngram_count = token_count_sr - (ngram_size - 1)
      else:
          ngram_sr, ngram_count, token_count_sr = self.get_char_ngrams(
              ngram_size, str_series, doc_id_sr
          )
  
      not_empty_docs = token_count_sr > 0
      doc_id_sr = doc_id_sr[not_empty_docs]
      ngram_count = ngram_count[not_empty_docs]
  
      doc_id_sr = doc_id_sr.repeat(ngram_count).reset_index(drop=True)
      tokenized_df = cudf.DataFrame()
      tokenized_df["doc_id"] = doc_id_sr
  
      ngram_sr = ngram_sr.reset_index(drop=True)
      tokenized_df["token"] = ngram_sr
      return tokenized_df
  
imports: from cuml.internals.safe_imports import cpu_only_import
  import cuml.internals.logger
  from cudf.utils.dtypes import min_signed_type
  from cuml.internals.type_utils import CUPY_SPARSE_DTYPES
  import numbers
  from cuml.internals.safe_imports import gpu_only_import
  from functools import partial
  from cuml.common.sparsefuncs import create_csr_matrix_from_count_df
  from cuml.common.sparsefuncs import csr_row_normalize_l1, csr_row_normalize_l2
  from cuml.feature_extraction._stop_words import ENGLISH_STOP_WORDS
  from cuml.common.exceptions import NotFittedError
  from cuml.internals.safe_imports import gpu_only_import_from
label_desc: Use image node_id 5 for calling the _VectorizerMixin obj's underlying member method code with example usage: obj.get_ngrams(str_series, ngram_size, doc_id_sr) and returns: tokenized_df