class_docstr: Convert a collection of raw documents to a document id matrix.
  
  Attributes:
      _use_char: boolean. Whether to use char feature.
      _num_norm: boolean. Whether to normalize text.
      _word_vocab: dict. A mapping of words to feature indices.
      _char_vocab: dict. A mapping of chars to feature indices.
      _label_vocab: dict. A mapping of labels to feature indices.
class_docstr_tok: ["Convert","a","collection","of","raw","documents","to","a","document","id","matrix",".","Attributes",":","_use_char",":","boolean",".","Whether","to","use","char","feature",".","_num_norm",":","boolean",".","Whether","to","normalize","text",".","_word_vocab",":","dict",".","A","mapping","of","words","to","feature","indices",".","_char_vocab",":","dict",".","A","mapping","of","chars","to","feature","indices",".","_label_vocab",":","dict",".","A","mapping","of","labels","to","feature","indices","."]
code: def __setstate__(self, state):
      self.__dict__.update(state)
      if not hasattr(self, "te_model"):
          self.te_model = None
      if not hasattr(self, "use_elmo"):
          self.use_elmo = False
      if not hasattr(self, "te_layers"):
          self.te_layers = U.DEFAULT_TRANSFORMER_LAYERS
  
      try:
          if self.te_model is not None:
              self.activate_transformer(
                  self.te_model, layers=self.te_layers
              )
          else:
              self.te = None
      except:
          self.te = None  # set in predictor for support for air-gapped networks
      if self.use_elmo:
          self.activate_elmo()
      else:
          self.elmo = None
  
imports: from ....None import utils
  from ....imports import *
  from .utils import Vocabulary
label_desc: Use image node_id 3 for calling the IndexTransformer obj's underlying member method code with example usage: obj.__setstate__(state) without return types