class_docstr: Default encoder class with inbuilt function for decoding text that
  has been encoded by the same object. Also supports label encoding.
  Can be used as a skeleton to build more sophisticated encoders on top.
class_docstr_tok: ["Default","encoder","class","with","inbuilt","function","for","decoding","text","that","has","been","encoded","by","the","same","object",".","Also","supports","label","encoding",".","Can","be","used","as","a","skeleton","to","build","more","sophisticated","encoders","on","top","."]
docstr: Decodes importances over encoded features as importances over
  raw features. Assumes the encoding was done with the same object.
  Operates on a datapoint-by-datapoint basis.
  
  Arguments:
      encoded_imp {list} -- List of importances in order of
          encoded features.
      input_text {[list]} -- List containing raw text over which
          importances are to be returned.
  
  Returns:
      [List with 2 components] --
      * decoded_imp -- Importances with 1:1 mapping to parsed sent.
      * parsed_sentence -- Raw text parsed as list with individual raw
          features.
docstr_tok: ["Decodes","importances","over","encoded","features","as","importances","over","raw","features",".","Assumes","the","encoding","was","done","with","the","same","object",".","Operates","on","a","datapoint-by-datapoint","basis",".","Arguments",":","encoded_imp","{","list","}","--","List","of","importances","in","order","of","encoded","features",".","input_text","{","[","list","]","}","--","List","containing","raw","text","over","which","importances","are","to","be","returned",".","Returns",":","[","List","with","2","components","]","--","*","decoded_imp","--","Importances","with","1:1","mapping","to","parsed","sent",".","*","parsed_sentence","--","Raw","text","parsed","as","list","with","individual","raw","features","."]
code: def decode_imp(self, encoded_imp, input_text):
      """Decodes importances over encoded features as importances over
      raw features. Assumes the encoding was done with the same object.
      Operates on a datapoint-by-datapoint basis.
  
      Arguments:
          encoded_imp {list} -- List of importances in order of
              encoded features.
          input_text {[list]} -- List containing raw text over which
              importances are to be returned.
  
      Returns:
          [List with 2 components] --
          * decoded_imp -- Importances with 1:1 mapping to parsed sent.
          * parsed_sentence -- Raw text parsed as list with individual raw
              features.
      """
      EMPTYTOKEN = "empty_token"
      parsed_sentence = []
      # obtain parsed sentence, while preserving token -> position in sentence mapping
      for i in self.tokenizer.parse(input_text):
          parsed_sentence += [str(i)]
      encoded_text = self.tokenizer.tokenize(input_text, keep_ids=True)
  
      # replace words with an empty token if deleted when tokenizing
      encoded_word_ids = [
          None
          if word == EMPTYTOKEN
          else self.vectorizer.vocabulary_.get(word)
          for word in encoded_text
      ]
      # obtain word importance corresponding to the word vectors of the encoded sentence
      decoded_imp = [
          0 if idx is None else encoded_imp[idx]
          for idx in encoded_word_ids
      ]
      return (decoded_imp, parsed_sentence)
  
file_path: interpret-text/python/interpret_text/experimental/common/utils_classical.py
imports: import spacy
  import html
  import string
  import numpy
  import matplotlib.pyplot
  from sklearn.preprocessing import LabelEncoder
  from IPython.core.display import display, HTML
  from sklearn.feature_extraction.text import CountVectorizer
label_desc: Use image node_id 4 for calling the BOWEncoder obj's underlying member method code with example usage: obj.decode_imp(encoded_imp, input_text) and returns: decoded_imp,  parsed_sentence