docstr: Sets the text to be processed
  
  Parameters
  ----------
  text
    Text to be processed.
docstr_tok: ["Sets","the","text","to","be","processed","Parameters","--","--","--","--","--","text","Text","to","be","processed","."]
code: def set_text(self, text: str) -> None:
      """
      Sets the text to be processed
  
      Parameters
      ----------
      text
        Text to be processed.
      """
      # Some language models can only work with a limited number of tokens. Thus the text needs
      # to be split in head_text and tail_text. We will only alter the head_tokens.
      (
          self.head,
          self.tail,
          self.head_tokens,
          self.tail_tokens,
      ) = self.model.head_tail_split(text)
  
      # define indices of the words which can be perturbed
      self.get_sample_ids(**self.perturb_opts)
  
      # Set dtypes
      self.set_data_type()
  
imports: import string
  from functools import partial
  from typing import Dict, List, Optional, Tuple
  import numpy
  import tensorflow
  from alibi.utils.lang_model import LanguageModel
  from alibi.explainers.anchors.text_samplers import AnchorTextSampler
label_desc: Use image node_id 3 for calling the LanguageModelSampler obj's underlying member method code with example usage: obj.set_text(text) without return types