class_docstr: Provides common code for text vectorizers (tokenization logic).
class_docstr_tok: ["Provides","common","code","for","text","vectorizers","(","tokenization","logic",")","."]
docstr: Return a function to preprocess the text before tokenization.
  
  If analyzer == 'word' and stop_words is not None, stop words are
  removed from the input documents after preprocessing.
  
  Returns
  -------
  preprocessor: callable
        A function to preprocess the text before tokenization.
docstr_tok: ["Return","a","function","to","preprocess","the","text","before","tokenization",".","If","analyzer","==","'word","'","and","stop_words","is","not","None",",","stop","words","are","removed","from","the","input","documents","after","preprocessing",".","Returns","--","--","--","-","preprocessor",":","callable","A","function","to","preprocess","the","text","before","tokenization","."]
code: def build_preprocessor(self):
      """
      Return a function to preprocess the text before tokenization.
  
      If analyzer == 'word' and stop_words is not None, stop words are
      removed from the input documents after preprocessing.
  
      Returns
      -------
      preprocessor: callable
            A function to preprocess the text before tokenization.
      """
      if self.preprocessor is not None:
          preprocess = self.preprocessor
      else:
          remove_non_alpha = self.analyzer == "word"
          preprocess = partial(
              _preprocess,
              lower=self.lowercase,
              remove_non_alphanumeric=remove_non_alpha,
              delimiter=self.delimiter,
          )
      return lambda doc: self._remove_stop_words(preprocess(doc))
  
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 2 for calling the _VectorizerMixin obj's underlying member method code with example usage: obj.build_preprocessor() and returns: function