class_docstr: Make short numbers grow into long numbers.
  
  Example::
  
      九百 -> 八百九十九
class_docstr_tok: ["Make","short","numbers","grow","into","long","numbers",".","Example",":",":","\u4e5d\u767e","-",">","\u516b\u767e\u4e5d\u5341\u4e5d"]
docstr: Number change function.
  
  :param str sentence: chinese sentence
  :param list label: Chinese word segmentation tag
  :return list: three list include the pos which are changed the words
      which are changed and the labels which are changed
docstr_tok: ["Number","change","function",".",":","param","str","sentence",":","chinese","sentence",":","param","list","label",":","Chinese","word","segmentation","tag",":","return","list",":","three","list","include","the","pos","which","are","changed","the","words","which","are","changed","and","the","labels","which","are","changed"]
code: def _get_transformations(self, sentence, label):
      r"""
      Number change function.
  
      :param str sentence: chinese sentence
      :param list label: Chinese word segmentation tag
      :return list: three list include the pos which are changed the words
          which are changed and the labels which are changed
  
      """
      assert len(sentence) == len(label)
  
      start = 0
      change_pos = []
      change_sentence = []
      change_labels = []
  
      while start < len(sentence):
          # find the number
          if sentence[start] in self.num_list:
              if (
                  label[start] == "S"
                  and sentence[start - 1 : start] != "第"
                  and sentence[start] != "一"
              ):
                  if self.num_list.index(sentence[start]) < 10:
                      # if single number
                      # create a 至 b
                      ra = random.randint(1, 10)
                      rb = random.randint(1, 10)
  
                      while rb == ra:
                          rb = random.randint(1, 10)
                      if ra > rb:
                          tmp = ra
                          ra = rb
                          rb = tmp
                      change = (
                          self.num_list[ra] + "至" + self.num_list[rb]
                      )
                      change_label = ["B", "M", "E"]
                      change_pos.append([start, start + 1])
                      change_sentence.append(change)
                      change_labels.append(change_label)
                  else:
                      # not a single number
                      change, change_label = self.number_change(
                          sentence, label, start, start
                      )
                      if change != "":
                          change_pos.append([start, start + 1])
                          change_sentence.append(change)
                          change_labels.append(change_label)
              elif label[start] == "B":
                  # Process numbers with length greater than 1
                  flag = 1
                  end = start
                  while label[end] != "E":
                      end += 1
                      if sentence[end] not in self.num_list:
                          flag = 0
                          break
                  if flag:
                      change, change_label = self.number_change(
                          sentence, label, start, end
                      )
                      if change:
                          change_pos.append([start, end + 1])
                          change_sentence.append(change)
                          change_labels.append(change_label)
                  start = end + 1
          start += 1
  
      return change_pos, change_sentence, change_labels
  
file_path: textflint/textflint/generation/transformation/CWS/cn_swap_num.py
imports: import random
  from ..transformation import Transformation
  from ....common.settings import NUM_LIST, NUM_FLAG1, NUM_FLAG2, NUM_BEGIN, NUM_END
label_desc: Use image node_id 4 for calling the CnSwapNum obj's underlying member method code with example usage: obj._get_transformations(sentence, label) and returns: change_pos,  change_sentence,  change_labels