class_docstr: Contractions.
  Replaces each expansion with its contracted version.
  
  Perturbation example:
  
  **Input:**
      She is a doctor, and I am a student
  
  **Output:**
      She's a doctor, and I'm a student
code: def __init__(self):
      self.contraction_map: Dict[str, str] = CONTRACTION_MAP
      self.reverse_contraction_map: Dict[str, str] = {
          value: key for key, value in self.contraction_map.items()
      }
      # Only contract things followed by a space to avoid contract end of sentence
      self.reverse_contraction_pattern = re.compile(
          r"\b({})\b ".format(
              "|".join(self.reverse_contraction_map.keys())
          ),
          flags=re.IGNORECASE | re.DOTALL,
      )
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/augmentations/contraction_expansion_perturbation.py
imports: from typing import Dict
  import re
  from random import Random
  from helm.common.general import match_case
  from .perturbation import Perturbation
  from .perturbation_description import PerturbationDescription
label_desc: Use image node_id 1 to create a new ContractionPerturbation object from inherited base classes: Perturbation with example: obj = ContractionPerturbation()