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","."]
docstr: Create a preprocessor object.
  
  Args:
      lower: boolean. Whether to convert the texts to lowercase.
      use_char: boolean. Whether to use char feature.
      num_norm: boolean. Whether to normalize text.
      initial_vocab: Iterable. Initial vocabulary for expanding word_vocab.
docstr_tok: ["Create","a","preprocessor","object",".","Args",":","lower",":","boolean",".","Whether","to","convert","the","texts","to","lowercase",".","use_char",":","boolean",".","Whether","to","use","char","feature",".","num_norm",":","boolean",".","Whether","to","normalize","text",".","initial_vocab",":","Iterable",".","Initial","vocabulary","for","expanding","word_vocab","."]
code: def __init__(
      self, lower=True, num_norm=True, use_char=True, initial_vocab=None
  ):
      """Create a preprocessor object.
  
      Args:
          lower: boolean. Whether to convert the texts to lowercase.
          use_char: boolean. Whether to use char feature.
          num_norm: boolean. Whether to normalize text.
          initial_vocab: Iterable. Initial vocabulary for expanding word_vocab.
      """
      self._num_norm = num_norm
      self._use_char = use_char
      self._word_vocab = Vocabulary(lower=lower)
      self._char_vocab = Vocabulary(lower=False)
      self._label_vocab = Vocabulary(lower=False, unk_token=False)
  
      if initial_vocab:
          self._word_vocab.add_documents([initial_vocab])
          self._char_vocab.add_documents(initial_vocab)
  
imports: import re
  import numpy
  from allennlp.modules.elmo import Elmo, batch_to_ids
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.externals import joblib
  from keras.utils.np_utils import to_categorical
  from keras.preprocessing.sequence import pad_sequences
  from anago.utils import Vocabulary
label_desc: Use image node_id 1 to create a new IndexTransformer object from inherited base classes: BaseEstimator, TransformerMixin with example: obj = IndexTransformer(lower, num_norm, use_char, initial_vocab)