docstr: :param string swap_type: the swap type in
  ['CrossCategory', 'OOV', 'SwapLonger']
  
  :param string res_path: dir for vocab/dict
docstr_tok: [":","param","string","swap_type",":","the","swap","type","in","[","'CrossCategory","'",",","'OOV","'",",","'SwapLonger","'","]",":","param","string","res_path",":","dir","for","vocab\/dict"]
code: def __init__(self, wsc_task="SwitchVoice", **kwargs):
      r"""
      :param string swap_type: the swap type in
      ['CrossCategory', 'OOV', 'SwapLonger']
  
      :param string res_path: dir for vocab/dict
      """
  
      super().__init__()
      trans_path = FILE_NAME_DICT[wsc_task + "_PATH"]
      res_dic = load_jsonlines(download_if_needed(trans_path))
      self.sample_dict = {}
      for data in res_dic:
          data = json.loads(data)
          sample = WSCSample(data)
          index = data["index"]
          self.sample_dict[index] = sample
  
file_path: textflint/textflint/generation/transformation/WSC/switch_voice.py
imports: import json
  from ...transformation import Transformation
  from ....common.utils.install import download_if_needed
  from ....common.utils.load import load_jsonlines
  from ....common.utils import logger
  from ....input.component.sample.wsc_sample import WSCSample
  from ....common.settings import FILE_NAME_DICT
label_desc: Use image node_id 1 to create a new SwitchVoice object from inherited base classes: Transformation with example: obj = SwitchVoice(wsc_task)