class_docstr: Replace verb with detachable words or a one a.
docstr: In this function, because there is only one deformation mode,
      only one set of outputs is output.
  
  :param ~textflint.CWSSample sample: the data which need be changed
  :param int n: the number of transformations
  :param **kwargs:
  :return: In this function, because there is only one deformation mode,
      only one set of outputs is output.
docstr_tok: ["In","this","function",",","because","there","is","only","one","deformation","mode",",","only","one","set","of","outputs","is","output",".",":","param","~textflint.CWSSample","sample",":","the","data","which","need","be","changed",":","param","int","n",":","the","number","of","transformations",":","param","*","*","kwargs",":",":","return",":","In","this","function",",","because","there","is","only","one","deformation","mode",",","only","one","set","of","outputs","is","output","."]
code: def _transform(self, sample, n=5, **kwargs):
      r"""
      In this function, because there is only one deformation mode,
          only one set of outputs is output.
  
      :param ~textflint.CWSSample sample: the data which need be changed
      :param int n: the number of transformations
      :param **kwargs:
      :return: In this function, because there is only one deformation mode,
          only one set of outputs is output.
  
      """
      # get sentence token
      origin_words = sample.get_words()
      origin_labels = sample.get_value("y")
      pos_tags = sample.pos_tags
      pos_tags = self.get_pos_tag_list(pos_tags)
      trans_sample = []
      # change function
      (
          change_pos,
          change_sentence,
          change_label,
      ) = self._get_transformations(
          origin_words, pos_tags, origin_labels
      )
      if len(change_pos) == 0:
          return []
      change_sample = sample.replace_at_ranges(
          change_pos, change_sentence, change_label
      )
      trans_sample.append(change_sample)
  
      return trans_sample
  
file_path: textflint/textflint/generation/transformation/CWS/swap_verb.py
imports: from ..transformation import Transformation
  from ....common.settings import DETACHABLE_WORD_PATH, AONEA_PATH
  from ....common.utils.load import plain_lines_loader
  from ....common.utils.install import download_if_needed
  from ....common.preprocess.cn_processor import CnProcessor
  import random
label_desc: Use image node_id 4 for calling the SwapVerb obj's underlying member method code with example usage: obj._transform(sample, n) and returns: trans_sample, list