class_docstr: Replace abbreviations with full names.
  
  Example::
  
      央视 -> 中央电视台
class_docstr_tok: ["Replace","abbreviations","with","full","names",".","Example",":",":","\u592e\u89c6","-",">","\u4e2d\u592e\u7535\u89c6\u53f0"]
docstr: Replace abbreviation function
  
  :param list words: chinese sentence words
  :return: change_pos, change_sentence, change_label
          three list include the pos which changed the word which changed
          and the label which changed
docstr_tok: ["Replace","abbreviation","function",":","param","list","words",":","chinese","sentence","words",":","return",":","change_pos",",","change_sentence",",","change_label","three","list","include","the","pos","which","changed","the","word","which","changed","and","the","label","which","changed"]
code: def _get_transformations(self, words):
      r"""
      Replace abbreviation function
  
      :param list words: chinese sentence words
      :return: change_pos, change_sentence, change_label
              three list include the pos which changed the word which changed
              and the label which changed
  
      """
      assert isinstance(
          words, list
      ), "The type of wrods must be a list not {0}".format(type(words))
      start = 0
      change_pos = []
      change_sentence = []
      change_label = []
  
      for word in words:
          # find the abbreviation
          if word in self.abbreviation_dict:
              # save abbreviations and change word segmentation labels
              change_pos.append([start, start + len(word)])
              change_sentence.append(self.abbreviation_dict[word])
              change = []
              for i in self.abbreviation_dict[word]:
                  if len(i) == 1:
                      change.append("S")
                  else:
                      change += ["B"] + ["M"] * (len(i) - 2) + ["E"]
              change_label.append(change)
          start += len(word)
      return change_pos, change_sentence, change_label
  
file_path: textflint/textflint/generation/transformation/CWS/swap_contraction.py
imports: from ..transformation import Transformation
  from ....common.settings import abbreviation_path
  from ....common.utils.load import plain_lines_loader
  from ....common.utils.install import download_if_needed
label_desc: Use image node_id 5 for calling the SwapContraction obj's underlying member method code with example usage: obj._get_transformations(words) and returns: change_pos,  change_sentence,  change_label