class_docstr: Provides common code for text vectorizers (tokenization logic).
class_docstr_tok: ["Provides","common","code","for","text","vectorizers","(","tokenization","logic",")","."]
docstr: Check validity of ngram_range parameter
docstr_tok: ["Check","validity","of","ngram_range","parameter"]
code: def _validate_params(self):
      """
      Check validity of ngram_range parameter
      """
      min_n, max_m = self.ngram_range
      msg = ""
      if min_n < 1:
          msg += "lower boundary must be >= 1. "
      if min_n > max_m:
          msg += "lower boundary larger than the upper boundary. "
      if msg != "":
          msg = (
              f"Invalid value for ngram_range={self.ngram_range} {msg}"
          )
          raise ValueError(msg)
  
      if hasattr(self, "n_features"):
          if not isinstance(self.n_features, numbers.Integral):
              raise TypeError(
                  f"n_features must be integral, got {self.n_features}\
                      ({type(self.n_features)})."
              )
  
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 8 for calling the _VectorizerMixin obj's underlying member method code with example usage: obj._validate_params() without return types