class_docstr: Transforms an input by performing contraction on recognized
  combinations.
class_docstr_tok: ["Transforms","an","input","by","performing","contraction","on","recognized","combinations","."]
docstr: Return all possible transformed sentences, each with one
  contraction.
  
  >>> from textattack.transformations import WordSwapContract
  >>> from textattack.augmentation import Augmenter
  
  >>> transformation = WordSwapContract()
  >>> augmenter = Augmenter(transformation=transformation)
  >>> s = 'I am 12 years old.'
  >>> augmenter.augment(s)
docstr_tok: ["Return","all","possible","transformed","sentences",",","each","with","one","contraction",".",">",">",">","from","textattack.transformations","import","WordSwapContract",">",">",">","from","textattack.augmentation","import","Augmenter",">",">",">","transformation","=","WordSwapContract","(",")",">",">",">","augmenter","=","Augmenter","(","transformation=transformation",")",">",">",">","s","=","'","I","am","12","years","old",".","'",">",">",">","augmenter.augment","(","s",")"]
code: def _get_transformations(self, current_text, indices_to_modify):
      """Return all possible transformed sentences, each with one
      contraction.
  
      >>> from textattack.transformations import WordSwapContract
      >>> from textattack.augmentation import Augmenter
  
      >>> transformation = WordSwapContract()
      >>> augmenter = Augmenter(transformation=transformation)
      >>> s = 'I am 12 years old.'
      >>> augmenter.augment(s)
      """
      transformed_texts = []
  
      words = current_text.words
      indices_to_modify = sorted(indices_to_modify)
  
      # search for every 2-words combination in reverse_contraction_map
      for idx, word_idx in enumerate(indices_to_modify[:-1]):
          next_idx = indices_to_modify[idx + 1]
          if (idx + 1) != next_idx:
              continue
          word = words[word_idx]
          next_word = words[next_idx]
  
          # generating the words to search for
          key = " ".join([word, next_word])
  
          # when a possible contraction is found in map, contract the current text
          if key in self.reverse_contraction_map:
              transformed_text = current_text.replace_word_at_index(
                  idx, self.reverse_contraction_map[key]
              )
              transformed_text = transformed_text.delete_word_at_index(
                  next_idx
              )
              transformed_texts.append(transformed_text)
  
      return transformed_texts
  
imports: from textattack.shared.data import EXTENSION_MAP
  from .word_swap import WordSwap
label_desc: Use image node_id 1 for calling the WordSwapContract obj's underlying member method code with example usage: obj._get_transformations(current_text, indices_to_modify) and returns: transformed_texts