class_docstr: Base task for NLP.
class_docstr_tok: ["Base","task","for","NLP","."]
docstr: Data pipeline function for pre-processing.
docstr_tok: ["Data","pipeline","function","for","pre-processing","."]
code: def pre_process_pipeline(self, input_sentences):
      """Data pipeline function for pre-processing."""
      language = self.task_config["language"]
      clean_english = self.task_config.get("clean_english", False)
      split_by_space = self.task_config.get("split_by_space", False)
      use_word = self.task_config.get("use_word", False)
  
      if language == "english":
          if clean_english:
              batch = clean_english_str_tf(input_sentences)
          else:
              batch = input_sentences
      else:
          if split_by_space:
              batch = input_sentences
          else:
              if use_word:
                  batch = chinese_word_cut_tf(input_sentences)
              else:
                  batch = char_cut_tf(input_sentences)
      return batch
  
file_path: delta/delta/data/task/base_text_task.py
imports: import os
  from absl import logging
  from delta.data.task.base_task import Task
  from delta import utils
  from delta.utils.register import registers
  from delta.data.preprocess.text_ops import clean_english_str_tf
  from delta.data.preprocess.text_ops import char_cut_tf
  from delta.data.preprocess.text_ops import tokenize_sentence
  from delta.data.preprocess.text_ops import chinese_word_cut_tf
label_desc: Use image node_id 4 for calling the TextTask obj's underlying member method code with example usage: obj.pre_process_pipeline(input_sentences) and returns: batch