class_docstr: Replace verb with detachable words or a one a.
docstr: Reduplication change function.
  
  :param list words: chinese sentence words
  :param list pos_tags: chinese sentence pos tags
  :param list labels: chinese sentence segmentation label
  :return: three list include the pos which changed the word which
      changed and the label which changed
docstr_tok: ["Reduplication","change","function",".",":","param","list","words",":","chinese","sentence","words",":","param","list","pos_tags",":","chinese","sentence","pos","tags",":","param","list","labels",":","chinese","sentence","segmentation","label",":","return",":","three","list","include","the","pos","which","changed","the","word","which","changed","and","the","label","which","changed"]
code: def _get_transformations(self, words, pos_tags, labels):
      r"""
      Reduplication change function.
  
      :param list words: chinese sentence words
      :param list pos_tags: chinese sentence pos tags
      :param list labels: chinese sentence segmentation label
      :return: three list include the pos which changed the word which
          changed and the label which changed
  
      """
  
      change_pos = []
      change_sentence = []
      change_label = []
      start = 0
  
      for word in words:
          # get every the word
          # find the word in AoneA dictionary
          flag1 = False
          flag2 = False
          if (
              start + 1 < len(labels)
              and pos_tags[start] == "v"
              and self.check_part_pos(word[1:])
              and word[0] in self.AoneA_list
          ):
              flag1 = True
          if word in self.detachable_word_list:
              flag2 = True
          # choice one method to change sentence
          if flag1 and flag2:
              t = random.choice([0, 1])
              if t == 0:
                  flag2 = False
              else:
                  flag1 = False
          if flag1:
              change_pos.append([start, start + 1])
              change_sentence.append(word[0] + "一" + word[0])
              if len(word) == 1:
                  change_label.append(["B", "M", "E"])
              else:
                  change_label.append(["B", "M", "M"])
          elif flag2:
              change_pos.append([start, start + len(word)])
              change_sentence.append(word[0] + "了个" + word[1:])
              change_label.append(["S"] * 4)
  
          start += len(word)
  
      return change_pos, change_sentence, change_label
  
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 5 for calling the SwapVerb obj's underlying member method code with example usage: obj._get_transformations(words, pos_tags, labels) and returns: change_pos,  change_sentence,  change_label