class_docstr: Swap entities with other entities of the same category.
class_docstr_tok: ["Swap","entities","with","other","entities","of","the","same","category","."]
docstr: Decompose given entities and normalize entity tag to ['LOCATION',
  'PERSON', 'ORGANIZATION']
  
  Example::
  
      [('Lionel Messi', 0, 2, 'PERSON'),
      ('Argentina', 7, 8, 'LOCATION')]
  
  >> [[0, 2], [7, 8]], ['Lionel Messi', 'Argentina'],
      ['PERSON', 'LOCATION']
  
  :param dict entities_info: parsed by default ner component.
  :return list indices: indices
  :return list entities: entity values
  :return list categories: categories
docstr_tok: ["Decompose","given","entities","and","normalize","entity","tag","to","[","'LOCATION","'",",","'PERSON","'",",","'ORGANIZATION","'","]","Example",":",":","[","(","'Lionel","Messi","'",",","0",",","2",",","'PERSON","'",")",",","(","'Argentina","'",",","7",",","8",",","'LOCATION","'",")","]",">",">","[","[","0",",","2","]",",","[","7",",","8","]","]",",","[","'Lionel","Messi","'",",","'Argentina","'","]",",","[","'PERSON","'",",","'LOCATION","'","]",":","param","dict","entities_info",":","parsed","by","default","ner","component",".",":","return","list","indices",":","indices",":","return","list","entities",":","entity","values",":","return","list","categories",":","categories"]
code: def decompose_entities_info(entities_info):
      r"""
      Decompose given entities and normalize entity tag to ['LOCATION',
      'PERSON', 'ORGANIZATION']
  
      Example::
  
          [('Lionel Messi', 0, 2, 'PERSON'),
          ('Argentina', 7, 8, 'LOCATION')]
  
      >> [[0, 2], [7, 8]], ['Lionel Messi', 'Argentina'],
          ['PERSON', 'LOCATION']
  
      :param dict entities_info: parsed by default ner component.
      :return list indices: indices
      :return list entities: entity values
      :return list categories: categories
  
      """
      indices = []
      entities = []
      categories = []
  
      for entity_info in entities_info:
          category = entity_info[3]
          if category in CORENLP_ENTITY_MAP:
              entities.append(entity_info[0])
              indices.append([entity_info[1], entity_info[2]])
              categories.append(CORENLP_ENTITY_MAP[category])
  
      return indices, entities, categories
  
file_path: textflint/textflint/generation/transformation/UT/swap_named_ent.py
imports: from ..transformation import Transformation
  from ....common.settings import ENTITIES_PATH, CORENLP_ENTITY_MAP
  from ....common.utils.load import json_loader
  from ....common.utils.list_op import trade_off_sub_words
  from ....common.utils.install import download_if_needed
label_desc: Use image node_id 4 for calling the SwapNamedEnt obj's underlying member method code with example usage: obj.decompose_entities_info(entities_info) and returns: indices,  entities,  categories