class_docstr: Maps feature ids to words or word-positions
docstr: Maps ids to words or word-position strings.
  
  Args:
      exp: list of tuples [(id, weight), (id,weight)]
      positions: if True, also return word positions
  
  Returns:
      list of tuples (word, weight), or (word_positions, weight) if
      examples: ('bad', 1) or ('bad_3-6-12', 1)
code: def map_exp_ids(self, exp, positions=False):
      """Maps ids to words or word-position strings.
  
      Args:
          exp: list of tuples [(id, weight), (id,weight)]
          positions: if True, also return word positions
  
      Returns:
          list of tuples (word, weight), or (word_positions, weight) if
          examples: ('bad', 1) or ('bad_3-6-12', 1)
      """
      if positions:
          exp = [
              (
                  "%s_%s"
                  % (
                      self.indexed_string.word(x[0]),
                      "-".join(
                          map(
                              str,
                              self.indexed_string.string_position(x[0]),
                          )
                      ),
                  ),
                  x[1],
              )
              for x in exp
          ]
      else:
          exp = [(self.indexed_string.word(x[0]), x[1]) for x in exp]
      return exp
  
imports: from functools import partial
  import itertools
  import json
  import re
  import numpy
  import scipy
  import sklearn
  from sklearn.utils import check_random_state
  from .None import explanation
  from .None import lime_base
label_desc: Use image node_id 2 for calling the TextDomainMapper obj's underlying member method code with example usage: obj.map_exp_ids(exp, positions) and returns: exp